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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Mar 2023 21:53:04 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        Marc Zyngier <maz@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        linux-arch@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH v2] irq domain: drop IRQ_DOMAIN_HIERARCHY option, make
 it always on

On Sun, Mar 12 2023 at 19:39, Randy Dunlap wrote:
> In preparation for dropping the IRQ_DOMAIN Kconfig option (effectively
> making it always set/on), first drop IRQ_DOMAIN_HIERARCHY as an option,
> making its code always set/on.
>
> This has been built successfully on all ARCHes except hexagon,
> both 32-bit and 64-bit where applicable.

I really like where this is going, but reviewing this is a pain. I tried
to split it up into more digestable pieces:

   https://tglx.de/~tglx/patches.tar

That's not completely equivalent to your patch as I did some of the
changes below. It builds on various oddball architectures with
IRQ_DOMAIN=n, but is otherwise completely untested.

It should be actually trivial after that to make IRQ_DOMAIN def_bool y
and then gradually remove the IRQ_DOMAIN selects and ifdeffery.

> v2: add stubs in include/linux/irqdomain.h for the config case of
> IRQ_DOMAIN is not set. If these are not added, there will be plenty
> of build errors (not so much for modern arches as for older ones).

I'm not really convinced that all of these stubs are required. Why would
there suddenly be a requirement to expose stubs for functions which
depend on CONFIG_IRQ_DOMAIN=y already today just by removing the
hierarchy config?

Even exposing stubs for functions which have been only available via
CONFIG_IRQ_DOMAIN_HIERARCHY is questionable simply because there cannot
be any code which invokes them unconditionally if
CONFIG_IRQ_DOMAIN_HIERARCHY=n today.

IOW, the sum of required stubs cannot be larger than number of stubs
required today.

If there is code which has a #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY then
this needs to be changed to CONFIG_IRQ_DOMAIN or the required functions
have to be exposed unconditionally, right?

> diff -- a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -361,7 +361,7 @@ config GPIO_IXP4XX
>  	depends on OF
>  	select GPIO_GENERIC
>  	select GPIOLIB_IRQCHIP
> -	select IRQ_DOMAIN_HIERARCHY
> +	select IRQ_DOMAIN

IRQ_DOMAIN is already selected by GPIOLIB_IRQCHIP, so this select is
redundant for all GPIO configs which select GPIOLIB_IRQCHIP.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ