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: <20250904163404.QMU7nfbA@linutronix.de>
Date: Thu, 4 Sep 2025 18:34:04 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Matthias Klose <doko@...ian.org>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nicolas Schier <nicolas.schier@...ux.dev>,
	Binutils <binutils@...rceware.org>
Subject: Re: [RFC] Don't create sframes during build

On 2025-09-04 16:02:42 [+0200], Matthias Klose wrote:
> [ CCing binutils@...rceware.org ]
> 
> On 9/4/25 15:18, Sebastian Andrzej Siewior wrote:
> > Hi,
> > 
> > gcc in Debian, starting with 15.2.0-2, 14.3.0-6 enables sframe
> > generation. Unless options like -ffreestanding are passed. Since this
> > isn't done, there are a few warnings during compile
> 
> If there are other options when sframe shouldn't be enabled, please tell.

No, I think this is okay.

…
> > We could drop the sframe during the final link but this does not get rid
> > of the objtool warnings so we would have to ignore them. But we don't
> > need it. So what about the following:
> > 
> > diff --git a/Makefile b/Makefile
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -886,6 +886,8 @@ ifdef CONFIG_CC_IS_GCC
> >   KBUILD_CFLAGS	+= $(call cc-option,--param=allow-store-data-races=0)
> >   KBUILD_CFLAGS	+= $(call cc-option,-fno-allow-store-data-races)
> >   endif
> > +# No sframe generation for kernel if enabled by default
> > +KBUILD_CFLAGS	+= $(call cc-option,-Xassembler --gsframe=no)
> >   ifdef CONFIG_READABLE_ASM
> >   # Disable optimizations that make assembler listings hard to read.
> This is what I chose for package builds that need disablement of sframe.

I think this would work for now. Longterm we would have to allow sframe
creation and keep section if an architecture decides to use it for its
backtracing. While orc seems fine on x86, there are arm64 patches to use
for as a stack unwinder.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ