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: <5147E060-2F35-4B55-ACAA-56D9DB0DD818@zytor.com>
Date: Fri, 07 Mar 2025 06:46:35 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Uros Bizjak <ubizjak@...il.com>
CC: x86@...nel.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] x86/boot: Do not test if AC and ID eflags are changeable on x86_64

On March 7, 2025 5:45:42 AM PST, Uros Bizjak <ubizjak@...il.com> wrote:
>On Fri, Mar 7, 2025 at 2:13 PM H. Peter Anvin <hpa@...or.com> wrote:
>
>> >> PUSF et al → pushf
>> >>
>> >> The -l and -q suffixes have been optional for a long time.
>> >
>> >No, not in this case. Please see the comment:
>> >
>> >/*
>> >* For building the 16-bit code we want to explicitly specify 32-bit
>> >* push/pop operations, rather than just saying 'pushf' or 'popf' and
>> >* letting the compiler choose.
>> >*/
>> >
>> >We are building 16-bit code here, and we want PUSHFL, the one with
>> >operand size prefix 0x66.
>> >
>> >Please consider the following code:
>> >
>> >    .code16
>> >    pushf
>> >    pushfl
>> >
>> >as -o push.o push.s
>> >
>> >objdump -dr -Mdata16 push.o
>> >
>> >0000000000000000 <.text>:
>> >  0:   9c                      pushf
>> >  1:   66 9c                   pushfl
>> >
>> >Uros.
>> >
>>
>> *plonk* I should have remembered (.code16gcc is different then .code16 though.) I wrote the damned things after all...
>
>Please note that while "gcc -m16" emits .code16gcc, "clang -m16" emits
>.code16, so in the latter case we don't have ‘pushf’, and ‘popf’
>instructions default to 32-bit size. So, the only solution is to
>decorate pushfl with operand size prefix in this specific case.
>
>Uros.
>

Can you please beat up the clang people who do gratuitously incompatible things like this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ