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: <YbNhuXeZm7x3bwcp@zn.tnic>
Date:   Fri, 10 Dec 2021 15:18:33 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Tony Luck <tony.luck@...el.com>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 04/12] x86/mce: Remove noinstr annotation from
 mce_setup()

On Thu, Dec 09, 2021 at 01:16:56PM +0100, Peter Zijlstra wrote:
> Yeah, that's what it does; but *why* is that correct?

Correct, shmorect - it is the #MC handler nasty.

> I'm thinking we're well past the exception entry code and are only
> using noinstr as a means to limit the amount of code in the MCE
> handler?

Well, one of the calls to mce_gather_info() happen in #MC context. That
one calls mce_setup() and that thing calls out to

# ./arch/x86/include/asm/paravirt.h:116:        PVOP_VCALL4(cpu.cpuid, eax, ebx, ecx, edx);
        cmpq    $0, pv_ops+176(%rip)    #, pv_ops.cpu.cpuid

and you get this:

vmlinux.o: warning: objtool: pv_ops[22]: xen_cpuid
vmlinux.o: warning: objtool: pv_ops[22]: native_cpuid
vmlinux.o: warning: objtool: mce_setup()+0xa0: call to pv_ops[22]() leaves .noinstr.text section

I think this is too much and too specific text to stick in the code as a
comment.

I can stick it in the commit message if you prefer that but frankly,
seeing those instrumentation_begin/_end() sandwiches are already hints
enough in my head to read "TODO" there...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ