Re: [PATCH v4 7/8] sframe: Introduce in-kernel SFRAME_VALIDATION
Jens Remus <[email protected]> Wed, 22 Apr 2026 16:11:12 +0200
| Newsgroups | org.kernel.vger.linux-toolchains,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.live-patching |
|---|---|
| Organization | IBM Deutschland Research & Development GmbH |
| Message-ID | <[email protected]> |
On 4/22/2026 12:51 AM, Dylan Hatch wrote: > Generalize the __safe* helpers to support a non-user-access code path. > > This requires arch-specific function address validation. This is because > arm64 vmlinux has an .rodata.text section which lies outside the bounds > of the normal .text. It contains code that is never executed by the > kernel mapping, but for which the toolchain nonetheless generates sframe > data, and needs to be considered valid for a PC lookup. > > This arch-specific address validation logic is only necessary to support > SFRAME_VALIDATION for the vmlinux .sframe, since these .rodata.text > functions would never be encountered during normal unwinding. > > Signed-off-by: Dylan Hatch <[email protected]> > Suggested-by: Jens Remus <[email protected]> With the minor nit below fixed: Reviewed-by: Jens Remus <[email protected]> > --- > arch/Kconfig | 2 +- > arch/arm64/include/asm/sections.h | 1 + > arch/arm64/include/asm/unwind_sframe.h | 21 +++++++++++++++++++++ > arch/arm64/kernel/vmlinux.lds.S | 2 ++ > include/linux/sframe.h | 2 ++ > kernel/unwind/sframe.c | 25 +++++++++++++++++++++++-- > 6 files changed, 50 insertions(+), 3 deletions(-) > diff --git a/arch/Kconfig b/arch/Kconfig > @@ -503,7 +503,7 @@ config HAVE_UNWIND_USER_SFRAME > > config SFRAME_VALIDATION > bool "Enable .sframe section debugging" > - depends on HAVE_UNWIND_USER_SFRAME > + depends on SFRAME_LOOKUP depends on UNWIND_SFRAME__LOOKUP > depends on DYNAMIC_DEBUG > help > When adding an .sframe section for a task, validate the entire Regards, Jens -- Jens Remus Linux on Z Development (D3303) [email protected] / [email protected] IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294 IBM Data Privacy Statement: https://www.ibm.com/privacy/