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]
Date:   Fri, 28 Apr 2023 12:48:47 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
        Ryan Roberts <ryan.roberts@....com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v3 01/60] arm64: kernel: Disable latent_entropy GCC
 plugin in early C runtime

On Fri, Apr 28, 2023 at 11:54:16AM +0100, Ard Biesheuvel wrote:
> On Fri, 28 Apr 2023 at 11:38, Mark Rutland <mark.rutland@....com> wrote:
> >
> > On Tue, Mar 07, 2023 at 03:04:23PM +0100, Ard Biesheuvel wrote:
> > > Avoid build issues in the early C code related to the latent_entropy GCC
> > > plugin, by incorporating the C flags fragment that disables it.
> > >
> > > Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> >
> > Just to check, are you seeing issues today? IIUC the plugin only instruments
> > functions which are explicitly marked with __latent_entropy, and if we're
> > seeing that happen unexpectedly (or due to that being applying to __meminit /
> > __init), we might need to do likewise for other noinstr code.
> >
> 
> I don't quite remember, tbh, but it is unlikely that I would have
> written or included this patch without having run into some actual
> issue.

Sure.

Looking at the series, from patch 15 onwards you mark portions of the PI code
as __init. As __init currently implies __latent_entropy (which I think is a bit
crazy as of itself...), that's why this'll start to fail.

It would be nice if we could mention that in the commit message, e.g.

| In subsequent patches we'll mark portions of the early C code as __init.
| Unfortunarely, __init implies __latent_entropy, and this would result in the
| early C code being instrumented in an unsafe manner.
|
| Disable the latent entropy plugin for the early C code.

... though my ack stands regardless of whether we add such wording.

Mark.

> > Regardless, for this patch:
> >
> > Acked-by: Mark Rutland <mark.rutland@....com>
> >
> 
> Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ