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: <CAFULd4ZXQzxq4ACOZUKpZKmGFomPxHxc+LhmXZ_uEVizjWbXiA@mail.gmail.com>
Date: Thu, 18 Jul 2024 09:27:04 +0200
From: Uros Bizjak <ubizjak@...il.com>
To: "H. Peter Anvin" <hpa@...or.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: Use __ASM_SIZE() to reduce ifdeffery in cpuflags.c

On Thu, Jul 18, 2024 at 8:59 AM H. Peter Anvin <hpa@...or.com> wrote:
>
> >> >-#ifdef __x86_64__
> >> >-#define PUSHF "pushfq"
> >> >-#define POPF "popfq"
> >> >-#else
> >> >-#define PUSHF "pushfl"
> >> >-#define POPF "popfl"
> >> >-#endif
> >> >+#define PUSHF __ASM_SIZE(pushf)
> >> >+#define POPF __ASM_SIZE(popf)
> >> >
> >> > int has_eflag(unsigned long mask)
> >> > {
> >>
> >> Just use pushf/popf. gas hasn't needed that suffix for a long time as far as I know.
> >
> >Yes, this works, too. So I guess we can also remove the comment
> >explaining the reason for explicit suffixes?
> >
> >Thanks,
> >Uros.
> >
>
> Yeah. You may want to check the version of binutils that fixed it and put that in the comments.

I have checked that the build works with 9 year old binutils-2.25
(minimal required version), so the fix was applied to an even earlier
version. I guess we don't want to burden unsuspecting readers with
historic toolchain oddities, so I propose to just remove the comment
for good.

Uros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ