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: <CAMj1kXFQXv0PeJQzKP8vg_BGYFcknbCcHX7-d+6t=LCi=ofU_A@mail.gmail.com>
Date: Mon, 21 Jul 2025 14:17:22 +1000
From: Ard Biesheuvel <ardb@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [GIT pull] x86/urgent for v6.16-rc7

On Mon, 21 Jul 2025 at 13:32, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Sun, 20 Jul 2025 at 20:14, Ard Biesheuvel <ardb@...nel.org> wrote:
> >
> > Just tried this: adding 'noinstr' to the declaration in asm/sev.h
> > makes no difference at all.
>
> Ok, thanks for checking.  It does seem a strange bug.
>
> That said, this area is a mess, and I really do think it's at least
> partly *our* mess.
>
> We should mark not only __sev_es_nmi_complete(), but the
> sev_es_nmi_complete() inline function wrapper as being 'noinstr'.
>
> But we can't do that, because 'noinstr' explicitly includes
> 'noinline', so we cannot do something sane like
>
>   static __always_inline noinstr void sev_es_nmi_complete(void) ..
>
> for the wrapper, because the compiler will very correctly say "I'm
> sorry Dave, I can't do that".
>

I also wonder what the semantics should be in this case, though:
attributes are generally tracked at function granularity or coarser,
and so inlining a noinstr function should either disable
instrumentation for the whole outer function, or disregard the
noinstr, as applying it only to the inlined code is not generally
possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ