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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Oct 2023 18:29:06 +0000
From:   Nadav Amit <namit@...are.com>
To:     Uros Bizjak <ubizjak@...il.com>
CC:     Linus Torvalds <torvalds@...ux-foundation.org>,
        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 18, 2023, at 9:08 PM, Uros Bizjak <ubizjak@...il.com> wrote:
> 
> We can use alias to __seg_gs non-const memory, so the value can be
> accessed without asm. __barrier() will then force reload. Please note
> that any memory clobber, hidden inside asm will also force reload.

For the record, at the time I tried to find a creative solution to
have fine granularity barrier control. I looked into address-spaces,
pure and const function attributes, and use of the restrict keyword.

I did not find a better solution. The behavior of most of these
mechanisms was non-intuitive for me and inconsistent across compilers.

You may succeed where I have failed as you seem more familiar with
the compiler code, but be aware it is a rabbit hole...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ