[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200224213319.GB409112@rani.riverdale.lan>
Date: Mon, 24 Feb 2020 16:33:19 -0500
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Arvind Sankar <nivedita@...m.mit.edu>,
Borislav Petkov <bp@...en8.de>,
Nathan Chancellor <natechancellor@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Michael Matz <matz@...e.de>, Fangrui Song <maskray@...gle.com>,
Kees Cook <keescook@...omium.org>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH 2/2] arch/x86: Drop unneeded linker script discard of
.eh_frame
On Mon, Feb 24, 2020 at 12:45:51PM -0800, Nick Desaulniers wrote:
>
> grepping for eh_frame in arch/x86/ there's a comment in
> arch/x86/include/asm/dwarf2.h:
> 40 #ifndef BUILD_VDSO
> 41 /*
> 42 * Emit CFI data in .debug_frame sections, not .eh_frame
> sections.
> 43 * The latter we currently just discard since we don't do DWARF
> 44 * unwinding at runtime. So only the offline DWARF information is
> 45 * useful to anyone. Note we should not use this directive if
> 46 * vmlinux.lds.S gets changed so it doesn't discard .eh_frame.
> 47 */
> 48 .cfi_sections .debug_frame
>
> add via:
> commit 7b956f035a9ef ("x86/asm: Re-add parts of the manual CFI infrastructure")
>
> https://sourceware.org/binutils/docs/as/CFI-directives.html#g_t_002ecfi_005fsections-section_005flist
> is the manual's section on .cfi_sections directives, and states `The
> default if this directive is not used is .cfi_sections .eh_frame.`.
> So the comment is slightly stale since we're no longer explicitly
> discarding .eh_frame in arch/x86/kernel/vmlinux.lds.S, rather
> preventing the generation via -fno-asynchronous-unwind-tables in
> KBUILD_CFLAGS (across a few different Makefiles). Would you mind also
> updating the comment in arch/x86/include/asm/dwarf2.h in a V2? The
> rest of this patch LGTM.
>
i.e. just replace that last sentence with "Note ... if we decide to use
runtime DWARF unwinding again"?
The whole ifdef-ery machinery there is obsolete, all the directives its
checking support for have been there since binutils-2.18, so should
probably also clean it up to just unconditionally define them.
Powered by blists - more mailing lists