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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875xqcypds.ffs@tglx>
Date: Tue, 01 Oct 2024 14:33:03 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Bart Van Assche <bvanassche@....org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Russell King
 <linux@...linux.org.uk>, linux-kernel@...r.kernel.org, Bart Van Assche
 <bvanassche@....org>
Subject: Re: [PATCH 01/21] genirq: Introduce number_of_interrupts() and
 set_number_of_interrupts()

On Mon, Sep 30 2024 at 11:15, Bart Van Assche wrote:
> This patch prepares for changing 'nr_irqs' from an exported global
> variable

git grep 'This patch' Documentation/process/

> into a variable with file scope.

Also what's the rationale for this?

>  
>  extern int nr_irqs;
> +int number_of_interrupts(void) __pure;
> +int set_number_of_interrupts(int nr);

Please use a proper name space prefix for the functions
irq_.....(). These random names are horrible.

>  extern struct irq_desc *irq_to_desc(unsigned int irq);
>  unsigned int irq_get_next_irq(unsigned int offset);
>  
> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> index 1dee88ba0ae4..8c6280843964 100644
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
> @@ -141,6 +141,20 @@ static void desc_set_defaults(unsigned int irq, struct irq_desc *desc, int node,
>  int nr_irqs = NR_IRQS;
>  EXPORT_SYMBOL_GPL(nr_irqs);
>  
> +int number_of_interrupts(void)
> +{
> +	return nr_irqs;

Why is this int? The number of interrupts is strictly positive, no?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ