[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5008073-f779-492b-807f-d14c39ec0ba3@linux.ibm.com>
Date: Fri, 24 Jan 2025 17:08:57 +0100
From: Jens Remus <jremus@...ux.ibm.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>, x86@...nel.org
Cc: Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, Indu Bhagat <indu.bhagat@...cle.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, Mark Brown <broonie@...nel.org>,
linux-toolchains@...r.kernel.org, Jordan Rome <jordalgo@...a.com>,
Sam James <sam@...too.org>, linux-trace-kernel@...r.kernel.org,
Andrii Nakryiko <andrii.nakryiko@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Florian Weimer <fweimer@...hat.com>, Andy Lutomirski <luto@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>, Weinan Liu <wnliu@...gle.com>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>
Subject: Re: [PATCH v4 05/39] x86/asm: Avoid emitting DWARF CFI for non-VDSO
On 22.01.2025 03:30, Josh Poimboeuf wrote:
> It was decided years ago that .cfi_* annotations aren't maintainable in
> the kernel. They were replaced by objtool unwind hints. For the kernel
> proper, ensure the CFI_* macros don't do anything.
>
> On the other hand the VDSO library *does* use them, so user space can
> unwind through it.
>
> Make sure these macros only work for VDSO. They aren't actually being
> used outside of VDSO anyway, so there's no functional change.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h
> -#ifndef BUILD_VDSO
> - /*
> - * Emit CFI data in .debug_frame sections, not .eh_frame sections.
> - * The latter we currently just discard since we don't do DWARF
> - * unwinding at runtime. So only the offline DWARF information is
> - * useful to anyone. Note we should not use this directive if we
> - * ever decide to enable DWARF unwinding at runtime.
> - */
> - .cfi_sections .debug_frame
> -#else
> - /*
> - * For the vDSO, emit both runtime unwind information and debug
> - * symbols for the .dbg file.
> - */
> - .cfi_sections .eh_frame, .debug_frame
> -#endif
> +#else /* !BUILD_VDSO */
> +
Did you remove ".cfi_sections .debug_frame" on purpose from the
!BUILD_VDSO path compared to V3? Presumably to not only not emit
DWARF CFI from assembler, but any source?
> +/*
> + * On x86, these macros aren't used outside VDSO. As well they shouldn't be:
> + * they're fragile and very difficult to maintain.
> + */
Thanks and regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@...ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
Powered by blists - more mailing lists