From: "H.J. Lu" <hjl.tools@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Kees Cook <keescook@chromium.org>,
Thomas Lendacky <Thomas.Lendacky@amd.com>,
Sami Tolvanen <samitolvanen@google.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Yu-cheng Yu <yu-cheng.yu@intel.com>
Subject: [PATCH 0/2] x86: Discard .note.gnu.property sections
Date: Fri, 24 Jan 2020 10:18:17 -0800 [thread overview]
Message-ID: <20200124181819.4840-1-hjl.tools@gmail.com> (raw)
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
next reply other threads:[~2020-01-24 18:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 18:18 H.J. Lu [this message]
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
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=20200124181819.4840-1-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=Thomas.Lendacky@amd.com \
--cc=bp@alien8.de \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=samitolvanen@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu-cheng.yu@intel.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;
as well as URLs for NNTP newsgroup(s).