linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] x86: Discard .note.gnu.property sections
@ 2020-01-24 18:18 H.J. Lu
  2020-01-24 18:18 ` [PATCH 1/2] x86: Discard .note.gnu.property sections in vDSO H.J. Lu
  2020-01-24 18:18 ` [PATCH 2/2] x86: Discard .note.gnu.property sections in vmlinux H.J. Lu
  0 siblings, 2 replies; 12+ messages in thread
From: H.J. Lu @ 2020-01-24 18:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Lutomirski, Thomas Gleixner, Kees Cook, Thomas Lendacky,
	Sami Tolvanen, Heiko Carstens, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, x86, Yu-cheng Yu

With the command-line option, -mx86-used-note=yes, the x86 assembler
in binutils 2.32 and above generates a program property note in a note
section, .note.gnu.property, to encode used x86 ISAs and features.  But
x86 kernel vmlinux and vDSO linker scripts only contain a signle NOTE
segment which may not be incompatible with note.gnu.property sections.
Since note.gnu.property section from kernel are unused, they should be
discarded by adding

/DISCARD/ : {
 *(.note.gnu.property)
}

before .notes sections.

H.J. Lu (2):
  x86: Discard .note.gnu.property sections in vDSO
  x86: Discard .note.gnu.property sections in vmlinux

 arch/x86/entry/vdso/vdso-layout.lds.S |  4 ++++
 arch/x86/kernel/vmlinux.lds.S         | 11 +++++++++++
 2 files changed, 15 insertions(+)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-01-30 22:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 18:18 [PATCH 0/2] x86: Discard .note.gnu.property sections H.J. Lu
2020-01-24 18:18 ` [PATCH 1/2] x86: Discard .note.gnu.property sections in vDSO H.J. Lu
2020-01-24 18:18 ` [PATCH 2/2] x86: Discard .note.gnu.property sections in vmlinux H.J. Lu
2020-01-27 23:34   ` Kees Cook
2020-01-30 17:51     ` H.J. Lu
2020-01-30 19:51       ` Kees Cook
2020-01-30 20:04         ` H.J. Lu
2020-01-30 20:08           ` Kees Cook
2020-01-30 20:20             ` H.J. Lu
2020-01-30 20:48               ` [PATCH] Discard .note.gnu.property sections in generic NOTES H.J. Lu
2020-01-30 22:09                 ` Kees Cook
2020-01-30 22:06               ` [PATCH 2/2] x86: Discard .note.gnu.property sections in vmlinux Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).