[PATCH v2 3/4] ARM: Reduce the number of #ifdef CONFIG_CPU_SW_DOMAIN_PAN

Linus Walleij linus.walleij at linaro.org
Tue Mar 12 01:22:05 PDT 2024


On Mon, Mar 11, 2024 at 5:02 PM Russell King (Oracle)
<linux at armlinux.org.uk> wrote:
> On Wed, Feb 21, 2024 at 12:04:02AM +0100, Linus Walleij wrote:
> > @@ -24,9 +24,10 @@
> >   * perform such accesses (eg, via list poison values) which could then
> >   * be exploited for priviledge escalation.
> >   */
> > +#if defined(CONFIG_CPU_SW_DOMAIN_PAN)
> > +
> >  static __always_inline unsigned int uaccess_save_and_enable(void)
> >  {
> > -#ifdef CONFIG_CPU_SW_DOMAIN_PAN
>
> This is an interesting way to reduce the #ifdef count... why switch it
> from #ifdef to #if defined ?

Hm that looks like a development artifact from a point where we
has if defined(A) && defined(B) and then one of them was removed.

I'll fix it up and put an updated version in the patch tracker.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list