lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Oct 2011 11:00:12 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@...esas.com>
cc:	linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: Re: [PATCH 2/2] irq: Add function pointer table for generic-chip

On Mon, 17 Oct 2011, Nobuhiro Iwamatsu wrote:

> This adds the function table to access it with function pointer
> by some functions providedd in generic-chip.
> The driver who uses the function offered in generic-chip can use
> this via this function table.
>  
> -/* Generic chip callback functions */
> -void irq_gc_noop(struct irq_data *d);
> -void irq_gc_mask_disable_reg(struct irq_data *d);
> -void irq_gc_mask_set_bit(struct irq_data *d);
> -void irq_gc_mask_clr_bit(struct irq_data *d);
> -void irq_gc_unmask_enable_reg(struct irq_data *d);
> -void irq_gc_ack_set_bit(struct irq_data *d);
> -void irq_gc_ack_clr_bit(struct irq_data *d);
> -void irq_gc_mask_disable_reg_and_ack(struct irq_data *d);
> -void irq_gc_eoi(struct irq_data *d);
> -int irq_gc_set_wake(struct irq_data *d, unsigned int on);

This breaks the world and some more. We have code which references
those functions directly.
  
> +		gc->functions.gc_noop = irq_gc_noop;
> +		gc->functions.gc_mask_disable_reg = irq_gc_mask_disable_reg;
> +		gc->functions.gc_mask_set_bit = irq_gc_mask_set_bit;
> +		gc->functions.gc_mask_clr_bit = irq_gc_mask_clr_bit;
> +		gc->functions.gc_unmask_enable_reg = irq_gc_unmask_enable_reg;
> +		gc->functions.gc_ack_set_bit = irq_gc_ack_set_bit;
> +		gc->functions.gc_ack_clr_bit = irq_gc_ack_clr_bit;
> +		gc->functions.gc_mask_disable_reg_and_ack = irq_gc_mask_disable_reg_and_ack;
> +		gc->functions.gc_eoi = irq_gc_eoi;
> +		gc->functions.gc_set_wake = irq_gc_set_wake;

Why do you want to add that to every instance of generic irq chip?
What I asked for is:

struct bla {
       .noop = irq_gc_noop,
       ...
};
EXPORT_SYMBOL_GPL(bla);

Now when we have this, we can run a coccinelle script over the tree
and convert all current users to use bla.fun instead of the direct
functions and then make those static.

Thanks,

	tglx

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists