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-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whbEhjSHR7D=8Q_xARd=UKHGcz750LoT1BeRdgTR+6uSw@mail.gmail.com>
Date:   Mon, 12 Oct 2020 11:56:45 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Uros Bizjak <ubizjak@...il.com>
Cc:     Borislav Petkov <bp@...e.de>, x86-ml <x86@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] x86/asm updates for v5.10

On Mon, Oct 12, 2020 at 11:41 AM Uros Bizjak <ubizjak@...il.com> wrote:
>
> GCC does not distinguish between %ah and %al and it is not possible to pass "%ah" to the assembly. To access the high part of the %ax register, %h modifier has to be used in the assembly template.

Do you know whether that's true for clang too, for example?

Also note that even if the _asm_ might get "%al", maybe the compiler
decided to use "%ah" for something else?

I have memories of gcc using the high registers at some point, but it
might have been some special case code - and it might also be very
historical.

[ Goes off and checks ]

In fact, I can still find gcc generating high register code, although
it's quite possible that yes, it's only peephole bit extract
instruction kind of use..

I also find that clang generates code that uses the high byte
registers, although again, that's not from any knowledge of clang
internals, and just by looking at my kernel image disassembly.

So yes, it _may_ all be just peepholes, but it's not obvious that this
is all safe.

                   Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ