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]
Message-ID: <CAMzpN2hPCwuR9ydEKybJSTvzeATYq1ovaMVM7Z1S8GCXpeyjmA@mail.gmail.com>
Date:   Thu, 30 Nov 2023 11:47:16 -0500
From:   Brian Gerst <brgerst@...il.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
        Nikolay Borisov <nik.borisov@...e.com>
Subject: Re: [PATCH] x86/ia32: State that IA32 emulation is disabled

On Thu, Nov 30, 2023 at 11:42 AM Brian Gerst <brgerst@...il.com> wrote:
>
> On Thu, Nov 30, 2023 at 11:09 AM Borislav Petkov <bp@...en8.de> wrote:
> >
> > On Thu, Nov 30, 2023 at 04:52:13PM +0100, Borislav Petkov wrote:
> > > +static inline bool ia32_enabled_verbose(void)
> > > +{
> > > +#ifdef CONFIG_IA32_EMULATION
> > > +     pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n");
> > > +#endif
> > > +     return ia32_enabled();
> > > +}
> >
> > As Nik rightfully points out offlist, this should rather be something
> > like:
> >
> > ---
> >         bool enabled = ia32_enabled();
> >
> > #ifdef CONFIG_IA32_EMULATION
> >         if (!enabled)
> >                 pr_notice_once("32-bit emulation disabled. You can reenable with ia32_emulation=on\n");
> > #endif
> >
> >         return enabled;
>
> The #ifdef isn't necessary, as ia32_enabled() will always return false
> in that case.

Scratch that, I misread it.  If compat is disabled at build time you
don't want the message to appear, or at least would want a different
message.

Brian Gerst

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ