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: <7D77A452-E61E-4B8B-B49C-949E1C8E257C@vmware.com>
Date:   Mon, 16 Oct 2023 20:35:24 +0000
From:   Nadav Amit <namit@...are.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Uros Bizjak <ubizjak@...il.com>
CC:     the arch/x86 maintainers <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Brian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()


> On Oct 16, 2023, at 10:24 PM, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> 
> So there's some serious corruption there, but from the oops itself I
> can't tell the source. I guess if we get 'current' wrong anywhere, all
> bets are off.

I don’t think it means that it the aliasing does not work; I think it all means that
it actually works *too well*.

I have encountered several such issues before [1], and while some have been fixed,
some have not (I looked at switch_fpu_finish()), and might under the right/wrong
circumstances use the wrongly-“cached” current. Moreover, perhaps new problems
have been added since my old patch.

Perhaps the whack-a-mole approach that I took in [1] is wrong. Instead, perhaps it
is better to use an uncached version of current when compiling
arch/x86/kernel/process_64.c and arch/x86/kernel/process_32.c , so they would not
use the const alias, but instead use the original (non-const) one. Some macro
magic and an additional "-D” build flag can do that.

But first, there is a need to confirm that’s actually the problem. I’ll try to do
it tomorrow.

Regards,
Nadav


[1] https://lore.kernel.org/all/20190823224424.15296-5-namit@vmware.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ