From: Brian Norris <briannorris@chromium.org>
To: Jens Remus <jremus@linux.ibm.com>
Cc: Indu Bhagat <ibhagatgnu@gmail.com>,
Dylan Hatch <dylanbhatch@google.com>,
Mostafa Saleh <smostafa@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Weinan Liu <wnliu@google.com>, Will Deacon <will@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Jiri Kosina <jikos@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Prasanna Kumar T S M <ptsm@linux.microsoft.com>,
Puranjay Mohan <puranjay@kernel.org>, Song Liu <song@kernel.org>,
joe.lawrence@redhat.com, linux-toolchains@vger.kernel.org,
linux-kernel@vger.kernel.org, live-patching@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v5 0/8] unwind, arm64: add sframe unwinder for kernel
Date: Wed, 15 Jul 2026 09:20:55 -0700 [thread overview]
Message-ID: <alezZ6tDIXSBY-v9@google.com> (raw)
In-Reply-To: <6e0d0afc-8a54-4763-b25d-dea122c4cd12@linux.ibm.com>
Hi Jens,
Thanks for looking! Lots more output below. Feel free to ask for more
info you tink could help.`
On Wed, Jul 15, 2026 at 10:06:20AM +0200, Jens Remus wrote:
> On 7/14/2026 2:28 AM, Brian Norris wrote:
> > On Tue, May 19, 2026 at 01:05:23PM +0200, Jens Remus wrote:
>
> > I also work at the same company as Dylan and Mostafa, and am therefore
> > probably using the same company-maintained Linux distribution.
> >
> >> On 5/18/2026 7:55 PM, Dylan Hatch wrote:
> >>> On Fri, May 15, 2026 at 4:32 AM Mostafa Saleh <smostafa@google.com> wrote:
> >>>> Not sure if related, but after updating my toolchain
> >>>> (aarch64-linux-gnu-gcc (Debian 15.2.0-4) 15.2.0), I hit link errors:
> >>>> ld.lld: error: arch/arm64/kernel/vdso/vgettimeofday.o:(.sframe) is being placed in '.sframe'
> >>>> ld.lld: error: arch/arm64/kernel/vdso/vgetrandom.o:(.sframe) is being placed in '.sframe`
>
> My understanding of above message is that the linker complains that the
> input object (e.g. vgettimeofday.o) has an .sframe section for which
> the linker script does not have any rule, so that it defaults to place
> it in .sframe in the output, which could not be the desired result.
Not sure if it's obvious to you, but I also found a few more details:
* This is most noticeable with CONFIG_WERROR=y, which turns the linker
warning into an error.
* It appears both with LD=ld.lld and with the default (bfd linker). bfd
shows:
/usr/bin/aarch64-linux-gnu-ld.bfd: error: unplaced orphan section `.sframe' from `arch/arm64/kernel/vdso/vgettimeofday.o'
/usr/bin/aarch64-linux-gnu-ld.bfd: error: unplaced orphan section `.sframe' from `arch/arm64/kernel/vdso/vgetrandom.o'
Otherwise, I don't have to do much special to hit this. Just
cross-compile ARCH=arm64 defconfig.
> > I've also been hitting this for some time, and I'd like to see if I can
> > figure out what's going wrong. My current workaround is:
> >
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -946,6 +946,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.
> >
> >>> Previously when developing against the SFrame V2 format, I had fixed
> >>> these warnings with the VDSO Makefile change currently in this series:
> >>>
> >>> diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> >>> index 7dec05dd33b7..c60ef921956f 100644
> >>> --- a/arch/arm64/kernel/vdso/Makefile
> >>> +++ b/arch/arm64/kernel/vdso/Makefile
> >>> @@ -38,7 +38,7 @@ ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
> >>> CC_FLAGS_REMOVE_VDSO := $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \
> >>> $(RANDSTRUCT_CFLAGS) $(KSTACK_ERASE_CFLAGS) \
> >>> $(GCC_PLUGINS_CFLAGS) \
> >>> - $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) \
> >>> + $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) $(CC_FLAGS_SFRAME) \
> >>> -Wmissing-prototypes -Wmissing-declarations
> >>>
> >>> CC_FLAGS_ADD_VDSO := -O2 -mcmodel=tiny -fasynchronous-unwind-tables
> >>>
> >>> But the warnings seem to have returned after upgrading my toolchain,
> >>> possibly due to SFrame V3 or some confounding change in GCC. The
> >>> --gsframe in the assembler should be set to 'no' by default, so
> >>> perhaps GCC is providing an override --gsframe internally?
> >>
> >> Could it be that your build of binutils was configured with
> >> --enable-default-sframe, so that the GNU assembler defaults to generate
> >> .sframe? AFAIK this configure option was meant for distributors and
> >> package maintainers.
> >>
> >> You can check as follows whether --gsframe defaults to "no" or "yes":
> >>
> >> $ as --help | grep -A1 gsframe
> >> --gsframe[={no|yes}] whether to generate SFrame stack trace information
> >> (default: no)
> >> ...
> >
> > $ aarch64-linux-gnu-as --help | grep -A1 gsframe
> > --gsframe[={no|yes}] whether to generate SFrame stack trace information
> > (default: no)
> > --
> > --gsframe-<N> generate SFrame version <N> information. 3 == <N>
> > --scfi=experimental Synthesize DWARF CFI for hand-written asm
> >
> >> Maybe build the VDSO separately with V=1 to see what assembler/compiler
> >> options are effectively used (e.g. for vgettimeofday.o and vgetrandom.o
> >> mentioned in the linker error message above)?
> >
> > A slightly tweaked version of my vgetrandom.o build line:
> >
> > # CC arch/arm64/kernel/vdso/vgetrandom.o
> > aarch64-linux-gnu-gcc -Wp,-MMD,arch/arm64/kernel/vdso/.vgetrandom.o.d -nostdinc -I./arch/arm64/include -I./arch/arm64/include/generated -I./include -I./include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -DCC_USING_PATCHABLE_FUNCTION_ENTRY -DKASAN_SHADOW_SCALE_SHIFT= -Werror -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -std=gnu11 -fms-extensions -mgeneral-regs-only -DCONFIG_CC_HAS_K_CONSTRAINT=1 -Wno-psabi -mabi=lp64 -fno-asynchronous-unwind-tables -fno-unwind-tables -mbranch-protection=pac-ret -Wa,-march=armv8.5-a -DARM64_ASM_ARCH='"armv8.5-a"' -DKASAN_SHADOW_SCALE_SHIFT= -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fzero-init-padding-bits=all -fno-stack-clash-protection -fno-inline-functions-called-once -fmin-function-alignment=8 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-main -Wno-type-limits -Wno-dangling-pointer -Wvla-larger-than=1 -Wno-pointer-sign -Wcast-function-type -Wno-unterminated-string-initialization -Wno-array-bounds -Wno-stringop-overflow -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1344 -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO -O2 -mcmodel=tiny -fasynchronous-unwind-tables -include ./lib/vdso/getrandom.c -I./arch/arm64/kernel/vdso -Iarch/arm64/kernel/vdso -DKBUILD_MODFILE='"arch/arm64/kernel/vdso/vgetrandom"' -DKBUILD_BASENAME='"vgetrandom"' -DKBUILD_MODNAME='"vgetrandom"' -D__KBUILD_MODNAME=vgetrandom -c -o arch/arm64/kernel/vdso/vgetrandom.o ./arch/arm64/kernel/vdso/vgetrandom.c
>
> That command line does not have any --gsframe[-3] (e.g. -Wa,--gsframe).
> I am not aware of any binutils release / repository state where the
> --gsframe default was broken.
FWIW, I'm usually testing on both v7.1 and approx v7.2-rc3, to make sure
my results are consistent, and it's not already somehow fixed.
> @Indu: Do you have any idea what could be going on?
>
> > I mostly don't know what I'm looking for w.r.t. gsframe features, but
> > I'm willing to poke at my compiler/assembler/build-process.
>
> Could it be that your gcc injects --gsframe e.g. via its spec file?
> Maybe that would show up if you run above command manually and append
> gcc option -v?
I've dumped most of the output below. I see that the 'as' invocation
includes --gsframe, but I'm not sure why.
$ aarch64-linux-gnu-gcc -Wp,-MMD,arch/arm64/kernel/vdso/.vgetrandom.o.d -nostdinc -I./arch/arm64/include -I./arch/arm64/include/generated -I./include -I./include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -DKASAN_SHADOW_SCALE_SHIFT= -Werror -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -std=gnu11 -fms-extensions -mgeneral-regs-only -DCONFIG_CC_HAS_K_CONSTRAINT=1 -Wno-psabi -mabi=lp64 -fno-asynchronous-unwind-tables -fno-unwind-tables -mbranch-protection=pac-ret -Wa,-march=armv8.5-a -DARM64_ASM_ARCH='"armv8.5-a"' -DKASAN_SHADOW_SCALE_SHIFT= -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fzero-init-padding-bits=all -fno-stack-clash-protection -fmin-function-alignment=4 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-main -Wno-type-limits -Wno-dangling-pointer -Wvla-larger-than=1 -Wno-pointer-sign -Wcast-function-type -Wno-unterminated-string-initialization -Wno-array-bounds -Wno-stringop-overflow -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -fno-var-tracking -femit-struct-debug-baseonly -mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1344 -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO -O2 -mcmodel=tiny -fasynchronous-unwind-tables -include $LINUX/lib/vdso/getrandom.c -DKBUILD_MODFILE='"arch/arm64/kernel/vdso/vgetrandom"' -DKBUILD_BASENAME='"vgetrandom"' -DKBUILD_MODNAME='"vgetrandom"' -D__KBUILD_MODNAME=vgetrandom -c -o arch/arm64/kernel/vdso/vgetrandom.o arch/arm64/kernel/vdso/vgetrandom.c -v
Using built-in specs.
COLLECT_AS_OPTIONS='-march=armv8.5-a'
COLLECT_GCC=aarch64-linux-gnu-gcc
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 15.2.0-4' --with-bugurl=file:///usr/share/doc/gcc-15/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,cobol,algol68 --prefix=/usr --with-gcc-major-version-only --program-suffix=-15 --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=aarch64-linux-gnu --program-prefix=aarch64-linux-gnu- --includedir=/usr/aarch64-linux-gnu/include --with-build-config=bootstrap-lto-lean --enable-link-serialization=32
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.2.0 (Debian 15.2.0-4)
COLLECT_GCC_OPTIONS='-nostdinc' '-I' './arch/arm64/include' '-I' './arch/arm64/include/generated' '-I' './include' '-I' './include' '-I' './arch/arm64/include/uapi' '-I' './arch/arm64/include/generated/uapi' '-I' './include/uapi' '-I' './include/generated/uapi' '-include' './include/linux/compiler-version.h' '-include' './include/linux/kconfig.h' '-include' './include/linux/compiler_types.h' '-D' '__KERNEL__' '-mlittle-endian' '-D' 'KASAN_SHADOW_SCALE_SHIFT=' '-Werror' '-fshort-wchar' '-funsigned-char' '-fno-PIE' '-fno-strict-aliasing' '-std=gnu11' '-fms-extensions' '-mgeneral-regs-only' '-D' 'CONFIG_CC_HAS_K_CONSTRAINT=1' '-Wno-psabi' '-mabi=lp64' '-fno-unwind-tables' '-mbranch-protection=pac-ret' '-D' 'ARM64_ASM_ARCH="armv8.5-a"' '-D' 'KASAN_SHADOW_SCALE_SHIFT=' '-fno-delete-null-pointer-checks' '-O2' '-fno-allow-store-data-races' '-fstack-protector-strong' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls' '-ftrivial-auto-var-init=zero' '-fzero-init-padding-bits=all' '-fno-stack-clash-protection' '-fmin-function-alignment=4' '-fstrict-flex-arrays=3' '-fno-strict-overflow' '-fstack-check=no' '-fconserve-stack' '-fno-builtin-wcslen' '-Wall' '-Wextra' '-Wundef' '-Werror=implicit-function-declaration' '-Werror=implicit-int' '-Werror=return-type' '-Werror=strict-prototypes' '-Wno-format-security' '-Wno-trigraphs' '-Wno-frame-address' '-Wno-address-of-packed-member' '-Wframe-larger-than=2048' '-Wno-main' '-Wno-type-limits' '-Wdangling-pointer=0' '-Wvla-larger-than=1' '-Wno-pointer-sign' '-Wcast-function-type' '-Wno-unterminated-string-initialization' '-Warray-bounds=0' '-Wstringop-overflow=0' '-Walloc-size-larger-than=$XXX' '-Wimplicit-fallthrough=5' '-Werror=date-time' '-Werror=incompatible-pointer-types' '-Werror=designated-init' '-Wenum-conversion' '-Wunused' '-Wno-unused-but-set-variable' '-Wunused-const-variable=0' '-Wno-packed-not-aligned' '-Wformat-overflow=0' '-Wformat-truncation=0' '-Wno-stringop-truncation' '-Wno-override-init' '-Wno-missing-field-initializers' '-Wno-shift-negative-value' '-Wno-maybe-uninitialized' '-Wno-sign-compare' '-Wno-unused-parameter' '-g' '-fno-var-tracking' '-femit-struct-debug-baseonly' '-mstack-protector-guard=sysreg' '-mstack-protector-guard-reg=sp_el0' '-mstack-protector-guard-offset=1344' '-fno-common' '-fno-builtin' '-fno-stack-protector' '-ffixed-x18' '-D' 'DISABLE_BRANCH_PROFILING' '-D' 'BUILD_VDSO' '-O2' '-mcmodel=tiny' '-fasynchronous-unwind-tables' '-include' '$LINUX/lib/vdso/getrandom.c' '-D' 'KBUILD_MODFILE="arch/arm64/kernel/vdso/vgetrandom"' '-D' 'KBUILD_BASENAME="vgetrandom"' '-D' 'KBUILD_MODNAME="vgetrandom"' '-D' '__KBUILD_MODNAME=vgetrandom' '-c' '-o' 'arch/arm64/kernel/vdso/vgetrandom.o' '-v' '-dumpdir' 'arch/arm64/kernel/vdso/'
/usr/libexec/gcc-cross/aarch64-linux-gnu/15/cc1 -quiet -nostdinc -v -I ./arch/arm64/include -I ./arch/arm64/include/generated -I ./include -I ./include -I ./arch/arm64/include/uapi -I ./arch/arm64/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -imultiarch aarch64-linux-gnu -D __KERNEL__ -D KASAN_SHADOW_SCALE_SHIFT= -D CONFIG_CC_HAS_K_CONSTRAINT=1 -D ARM64_ASM_ARCH="armv8.5-a" -D KASAN_SHADOW_SCALE_SHIFT= -D DISABLE_BRANCH_PROFILING -D BUILD_VDSO -D KBUILD_MODFILE="arch/arm64/kernel/vdso/vgetrandom" -D KBUILD_BASENAME="vgetrandom" -D KBUILD_MODNAME="vgetrandom" -D __KBUILD_MODNAME=vgetrandom -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -include /usr/local/google/home/briannorris/git/linux/lib/vdso/getrandom.c -MMD arch/arm64/kernel/vdso/.vgetrandom.o.d arch/arm64/kernel/vdso/vgetrandom.c -quiet -dumpdir arch/arm64/kernel/vdso/ -dumpbase vgetrandom.c -dumpbase-ext .c -mlittle-endian -mgeneral-regs-only -mabi=lp64 -mbranch-protection=pac-ret -mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1344 -mcmodel=tiny -g -O2 -O2 -Werror -Wno-psabi -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-main -Wno-type-limits -Wdangling-pointer=0 -Wvla-larger-than=1 -Wno-pointer-sign -Wcast-function-type -Wno-unterminated-string-initialization -Warray-bounds=0 -Wstringop-overflow=0 -Walloc-size-larger-than=18446744073709551615EiB -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wunused-const-variable=0 -Wno-packed-not-aligned -Wformat-overflow=0 -Wformat-truncation=0 -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -std=gnu11 -version -fshort-wchar -funsigned-char -fno-PIE -fno-strict-aliasing -fms-extensions -fno-unwind-tables -fno-delete-null-pointer-checks -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fzero-init-padding-bits=all -fno-stack-clash-protection -fmin-function-alignment=4 -fstrict-flex-arrays=3 -fno-strict-overflow -fstack-check=no -fconserve-stack -fno-builtin-wcslen -fno-var-tracking -femit-struct-debug-baseonly -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 -fasynchronous-unwind-tables -fasynchronous-unwind-tables -o /tmp/cc6nO0fY.s
GNU C11 (Debian 15.2.0-4) version 15.2.0 (aarch64-linux-gnu)
compiled by GNU C version 15.2.0, GMP version 6.3.0, MPFR version 4.2.2, MPC version 1.3.1, isl version isl-0.27-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "./include"
#include "..." search starts here:
#include <...> search starts here:
./arch/arm64/include
./arch/arm64/include/generated
./include
./arch/arm64/include/uapi
./arch/arm64/include/generated/uapi
./include/uapi
./include/generated/uapi
End of search list.
Compiler executable checksum: 2014541e26adcb350b182f07eff54ec5
COLLECT_GCC_OPTIONS='-nostdinc' '-I' './arch/arm64/include' '-I' './arch/arm64/include/generated' '-I' './include' '-I' './include' '-I' './arch/arm64/include/uapi' '-I' './arch/arm64/include/generated/uapi' '-I' './include/uapi' '-I' './include/generated/uapi' '-include' './include/linux/compiler-version.h' '-include' './include/linux/kconfig.h' '-include' './include/linux/compiler_types.h' '-D' '__KERNEL__' '-mlittle-endian' '-D' 'KASAN_SHADOW_SCALE_SHIFT=' '-Werror' '-fshort-wchar' '-funsigned-char' '-fno-PIE' '-fno-strict-aliasing' '-std=gnu11' '-fms-extensions' '-mgeneral-regs-only' '-D' 'CONFIG_CC_HAS_K_CONSTRAINT=1' '-Wno-psabi' '-mabi=lp64' '-fno-unwind-tables' '-mbranch-protection=pac-ret' '-D' 'ARM64_ASM_ARCH="armv8.5-a"' '-D' 'KASAN_SHADOW_SCALE_SHIFT=' '-fno-delete-null-pointer-checks' '-O2' '-fno-allow-store-data-races' '-fstack-protector-strong' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls' '-ftrivial-auto-var-init=zero' '-fzero-init-padding-bits=all' '-fno-stack-clash-protection' '-fmin-function-alignment=4' '-fstrict-flex-arrays=3' '-fno-strict-overflow' '-fstack-check=no' '-fconserve-stack' '-fno-builtin-wcslen' '-Wall' '-Wextra' '-Wundef' '-Werror=implicit-function-declaration' '-Werror=implicit-int' '-Werror=return-type' '-Werror=strict-prototypes' '-Wno-format-security' '-Wno-trigraphs' '-Wno-frame-address' '-Wno-address-of-packed-member' '-Wframe-larger-than=2048' '-Wno-main' '-Wno-type-limits' '-Wdangling-pointer=0' '-Wvla-larger-than=1' '-Wno-pointer-sign' '-Wcast-function-type' '-Wno-unterminated-string-initialization' '-Warray-bounds=0' '-Wstringop-overflow=0' '-Walloc-size-larger-than=$XXX' '-Wimplicit-fallthrough=5' '-Werror=date-time' '-Werror=incompatible-pointer-types' '-Werror=designated-init' '-Wenum-conversion' '-Wunused' '-Wno-unused-but-set-variable' '-Wunused-const-variable=0' '-Wno-packed-not-aligned' '-Wformat-overflow=0' '-Wformat-truncation=0' '-Wno-stringop-truncation' '-Wno-override-init' '-Wno-missing-field-initializers' '-Wno-shift-negative-value' '-Wno-maybe-uninitialized' '-Wno-sign-compare' '-Wno-unused-parameter' '-g' '-fno-var-tracking' '-femit-struct-debug-baseonly' '-mstack-protector-guard=sysreg' '-mstack-protector-guard-reg=sp_el0' '-mstack-protector-guard-offset=1344' '-fno-common' '-fno-builtin' '-fno-stack-protector' '-ffixed-x18' '-D' 'DISABLE_BRANCH_PROFILING' '-D' 'BUILD_VDSO' '-O2' '-mcmodel=tiny' '-fasynchronous-unwind-tables' '-include' '/usr/local/google/home/briannorris/git/linux/lib/vdso/getrandom.c' '-D' 'KBUILD_MODFILE="arch/arm64/kernel/vdso/vgetrandom"' '-D' 'KBUILD_BASENAME="vgetrandom"' '-D' 'KBUILD_MODNAME="vgetrandom"' '-D' '__KBUILD_MODNAME=vgetrandom' '-c' '-o' 'arch/arm64/kernel/vdso/vgetrandom.o' '-v' '-dumpdir' 'arch/arm64/kernel/vdso/'
/usr/lib/gcc-cross/aarch64-linux-gnu/15/../../../../aarch64-linux-gnu/bin/as -v -I ./arch/arm64/include -I ./arch/arm64/include/generated -I ./include -I ./include -I ./arch/arm64/include/uapi -I ./arch/arm64/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi --gsframe --gdwarf-5 -EL -mabi=lp64 -march=armv8.5-a -o arch/arm64/kernel/vdso/vgetrandom.o /tmp/cc6nO0fY.s
GNU assembler version 2.46.50 (aarch64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.46.50.20260617
COMPILER_PATH=/usr/libexec/gcc-cross/aarch64-linux-gnu/15/:/usr/libexec/gcc-cross/aarch64-linux-gnu/15/:/usr/libexec/gcc-cross/aarch64-linux-gnu/:/usr/lib/gcc-cross/aarch64-linux-gnu/15/:/usr/lib/gcc-cross/aarch64-linux-gnu/:/usr/lib/gcc-cross/aarch64-linux-gnu/15/../../../../aarch64-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc-cross/aarch64-linux-gnu/15/:/usr/lib/gcc-cross/aarch64-linux-gnu/15/../../../../aarch64-linux-gnu/lib/../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc-cross/aarch64-linux-gnu/15/../../../../aarch64-linux-gnu/lib/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-nostdinc' '-I' './arch/arm64/include' '-I' './arch/arm64/include/generated' '-I' './include' '-I' './include' '-I' './arch/arm64/include/uapi' '-I' './arch/arm64/include/generated/uapi' '-I' './include/uapi' '-I' './include/generated/uapi' '-include' './include/linux/compiler-version.h' '-include' './include/linux/kconfig.h' '-include' './include/linux/compiler_types.h' '-D' '__KERNEL__' '-mlittle-endian' '-D' 'KASAN_SHADOW_SCALE_SHIFT=' '-Werror' '-fshort-wchar' '-funsigned-char' '-fno-PIE' '-fno-strict-aliasing' '-std=gnu11' '-fms-extensions' '-mgeneral-regs-only' '-D' 'CONFIG_CC_HAS_K_CONSTRAINT=1' '-Wno-psabi' '-mabi=lp64' '-fno-unwind-tables' '-mbranch-protection=pac-ret' '-D' 'ARM64_ASM_ARCH="armv8.5-a"' '-D' 'KASAN_SHADOW_SCALE_SHIFT=' '-fno-delete-null-pointer-checks' '-O2' '-fno-allow-store-data-races' '-fstack-protector-strong' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls' '-ftrivial-auto-var-init=zero' '-fzero-init-padding-bits=all' '-fno-stack-clash-protection' '-fmin-function-alignment=4' '-fstrict-flex-arrays=3' '-fno-strict-overflow' '-fstack-check=no' '-fconserve-stack' '-fno-builtin-wcslen' '-Wall' '-Wextra' '-Wundef' '-Werror=implicit-function-declaration' '-Werror=implicit-int' '-Werror=return-type' '-Werror=strict-prototypes' '-Wno-format-security' '-Wno-trigraphs' '-Wno-frame-address' '-Wno-address-of-packed-member' '-Wframe-larger-than=2048' '-Wno-main' '-Wno-type-limits' '-Wdangling-pointer=0' '-Wvla-larger-than=1' '-Wno-pointer-sign' '-Wcast-function-type' '-Wno-unterminated-string-initialization' '-Warray-bounds=0' '-Wstringop-overflow=0' '-Walloc-size-larger-than=$XXX' '-Wimplicit-fallthrough=5' '-Werror=date-time' '-Werror=incompatible-pointer-types' '-Werror=designated-init' '-Wenum-conversion' '-Wunused' '-Wno-unused-but-set-variable' '-Wunused-const-variable=0' '-Wno-packed-not-aligned' '-Wformat-overflow=0' '-Wformat-truncation=0' '-Wno-stringop-truncation' '-Wno-override-init' '-Wno-missing-field-initializers' '-Wno-shift-negative-value' '-Wno-maybe-uninitialized' '-Wno-sign-compare' '-Wno-unused-parameter' '-g' '-fno-var-tracking' '-femit-struct-debug-baseonly' '-mstack-protector-guard=sysreg' '-mstack-protector-guard-reg=sp_el0' '-mstack-protector-guard-offset=1344' '-fno-common' '-fno-builtin' '-fno-stack-protector' '-ffixed-x18' '-D' 'DISABLE_BRANCH_PROFILING' '-D' 'BUILD_VDSO' '-O2' '-mcmodel=tiny' '-fasynchronous-unwind-tables' '-include' '/usr/local/google/home/briannorris/git/linux/lib/vdso/getrandom.c' '-D' 'KBUILD_MODFILE="arch/arm64/kernel/vdso/vgetrandom"' '-D' 'KBUILD_BASENAME="vgetrandom"' '-D' 'KBUILD_MODNAME="vgetrandom"' '-D' '__KBUILD_MODNAME=vgetrandom' '-c' '-o' 'arch/arm64/kernel/vdso/vgetrandom.o' '-v' '-dumpdir' 'arch/arm64/kernel/vdso/vgetrandom.'
> Does the intermediate source or assembler source have any
> ".cfi_section .sframe" statement?
>
> $ make arch/arm64/kernel/vdso/vgetrandom.i
This fails to build with WERROR, because it seems to require the linker
step that fails, so I have to disable WERROR. Afterward:
$ grep -i sframe arch/arm64/kernel/vdso/vgetrandom.i
// (empty)
> $ make arch/arm64/kernel/vdso/vgetrandom.s
This fails to build.
$ make CROSS_COMPILE='ccache aarch64-linux-gnu-' ARCH=arm64 -j80 arch/arm64/kernel/vdso/vgetrandom.s
CC arch/arm64/kernel/vdso/vgetrandom.s
arch/arm64/kernel/vdso/vgetrandom.c:5:8: error: ‘__cvdso_getrandom’ undeclared here (not in a function)
5 | typeof(__cvdso_getrandom) __kernel_getrandom;
| ^~~~~~~~~~~~~~~~~
arch/arm64/kernel/vdso/vgetrandom.c:7:1: error: unknown type name ‘ssize_t’
7 | ssize_t __kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
| ^~~~~~~
arch/arm64/kernel/vdso/vgetrandom.c:7:42: error: unknown type name ‘size_t’
7 | ssize_t __kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
| ^~~~~~
arch/arm64/kernel/vdso/vgetrandom.c:4:1: note: ‘size_t’ is defined in header ‘<stddef.h>’; this is probably fixable by adding ‘#include <stddef.h>’
3 | #include <uapi/asm-generic/errno.h>
+++ |+#include <stddef.h>
4 |
arch/arm64/kernel/vdso/vgetrandom.c:7:94: error: unknown type name ‘size_t’
7 | ssize_t __kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
| ^~~~~~
arch/arm64/kernel/vdso/vgetrandom.c:7:94: note: ‘size_t’ is defined in header ‘<stddef.h>’; this is probably fixable by adding ‘#include <stddef.h>’
make[4]: *** [scripts/Makefile.build:184: arch/arm64/kernel/vdso/vgetrandom.s] Error 1
make[3]: *** [scripts/Makefile.build:549: arch/arm64/kernel] Error 2
make[2]: *** [scripts/Makefile.build:549: arch/arm64] Error 2
> Can you please verify that your arch/arm64/kernel/vdso/vgetrandom.o
> actually contains an .sframe section:
>
> $ readelf -WS arch/arm64/kernel/vdso/vgetrandom.o
$ readelf -WS arch/arm64/kernel/vdso/vgetrandom.o | grep -i sframe
[22] .sframe GNU_SFRAME 0000000000000000 002438 000083 00 A 0 0 8
[23] .rela.sframe RELA 0000000000000000 003988 000018 18 I 24 22 8
Brian
next prev parent reply other threads:[~2026-07-15 16:21 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 18:36 [PATCH v5 0/8] unwind, arm64: add sframe unwinder for kernel Dylan Hatch
2026-04-28 18:36 ` [PATCH v5 1/8] sframe: Allow kernelspace sframe sections Dylan Hatch
2026-04-28 18:36 ` [PATCH v5 2/8] arm64, unwind: build kernel with sframe V3 info Dylan Hatch
2026-04-28 18:36 ` [PATCH v5 3/8] arm64: entry: add unwind info for various kernel entries Dylan Hatch
2026-04-29 15:26 ` Mark Rutland
2026-05-15 3:30 ` Dylan Hatch
2026-05-15 8:58 ` Mark Rutland
2026-05-18 22:41 ` Dylan Hatch
2026-04-28 18:36 ` [PATCH v5 4/8] sframe: Provide PC lookup for vmlinux .sframe section Dylan Hatch
2026-04-28 18:36 ` [PATCH v5 5/8] sframe: Allow unsorted FDEs Dylan Hatch
2026-04-30 10:04 ` Jens Remus
2026-04-28 18:36 ` [PATCH v5 6/8] arm64/module, sframe: Add sframe support for modules Dylan Hatch
2026-04-30 10:04 ` Jens Remus
2026-04-28 18:36 ` [PATCH v5 7/8] sframe: Introduce in-kernel SFRAME_VALIDATION Dylan Hatch
2026-04-30 10:04 ` Jens Remus
2026-04-28 18:36 ` [PATCH v5 8/8] unwind: arm64: Use sframe to unwind interrupt frames Dylan Hatch
2026-05-01 16:46 ` Mark Rutland
2026-05-04 8:47 ` Jens Remus
2026-05-05 10:29 ` Mark Rutland
2026-05-05 15:52 ` Jens Remus
2026-05-12 3:00 ` Dylan Hatch
2026-05-12 8:55 ` Jens Remus
2026-05-12 10:18 ` Mark Rutland
2026-05-12 10:07 ` Mark Rutland
2026-05-19 6:29 ` Dylan Hatch
2026-04-29 17:18 ` [PATCH v5 0/8] unwind, arm64: add sframe unwinder for kernel Mark Rutland
2026-04-30 10:11 ` Jens Remus
2026-05-12 1:10 ` Dylan Hatch
2026-05-15 11:32 ` Mostafa Saleh
2026-05-18 17:55 ` Dylan Hatch
2026-05-19 11:05 ` Jens Remus
2026-07-14 0:28 ` Brian Norris
2026-07-15 8:06 ` Jens Remus
2026-07-15 16:20 ` Brian Norris [this message]
2026-07-16 11:03 ` Jens Remus
2026-07-16 17:39 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alezZ6tDIXSBY-v9@google.com \
--to=briannorris@chromium.org \
--cc=catalin.marinas@arm.com \
--cc=dylanbhatch@google.com \
--cc=ibhagatgnu@gmail.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=jremus@linux.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-toolchains@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=ptsm@linux.microsoft.com \
--cc=puranjay@kernel.org \
--cc=rdunlap@infradead.org \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=smostafa@google.com \
--cc=song@kernel.org \
--cc=will@kernel.org \
--cc=wnliu@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox