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: <CAHk-=wiSn8fY4xF-=Bz=qPcbmT_Yzzb4jvvtMBuNQksk94Y=dw@mail.gmail.com>
Date:   Wed, 11 Oct 2023 12:40:09 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Uros Bizjak <ubizjak@...il.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Nadav Amit <namit@...are.com>,
        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>
Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()

On Wed, 11 Oct 2023 at 00:45, Uros Bizjak <ubizjak@...il.com> wrote:
>
> In fact, rdgsbase is available only for 64-bit targets.

Not even all 64-bit targets. That's why I did that ALTERNATIVE() thing
with X86_FEATURE_FSGSBASE, which uses the kernel instruction
re-writing.

So that suggested asm of mine defaults to loading the value from
memory through %gs, but with X86_FEATURE_FSGSBASE it gets rewritten to
use rdgsbase.

And again - I'm not sure it's any faster, but it's _potentially_
certainly better in that it doesn't use the cache-line.

           Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ