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: <20251218102256.GP3707891@noisy.programming.kicks-ass.net>
Date: Thu, 18 Dec 2025 11:22:56 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH] x86/irqflags: Force a register output in native_save_fl()

On Thu, Dec 18, 2025 at 11:15:37AM +0100, Eric Dumazet wrote:

> > >--- a/arch/x86/include/asm/irqflags.h
> > >+++ b/arch/x86/include/asm/irqflags.h
> > >@@ -18,14 +18,9 @@ extern __always_inline unsigned long native_save_fl(void)
> > > {
> > >       unsigned long flags;
> > >
> > >-      /*
> > >-       * "=rm" is safe here, because "pop" adjusts the stack before
> > >-       * it evaluates its effective address -- this is part of the
> > >-       * documented behavior of the "pop" instruction.
> > >-       */
> > >       asm volatile("# __raw_save_flags\n\t"
> > >                    "pushf ; pop %0"
> > >-                   : "=rm" (flags)
> > >+                   : "=r" (flags)
> > >                    : /* no input */
> > >                    : "memory");
> > >
> >
> > Maybe report a bug to the clang team?
> 
> This has been done 8 years ago. No progress so far...
> 
> They claim we should use __builtin_ia32_readeflags_u64 /
> __builtin_ia32_writeeflags_u64, which seems unlikely to please x86
> maintainers ?

Yeah, because the "rm" thing not being supported properly goes way
further than just this one case. And it really is abysmal that clang
hasn't managed to implement it in all that time :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ