public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: Andy Lutomirski <luto@kernel.org>,
	mjw@fedoraproject.org, "H . J . Lu" <hjl.tools@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Laura Abbott <labbott@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	X86 ML <x86@kernel.org>,
	linux-kernel@vger.kernel.org, Nick Clifton <nickc@redhat.com>,
	Cary Coutant <ccoutant@gmail.com>,
	linux-kbuild@vger.kernel.org
Subject: [PATCHv4 3/3] x86: Add build salt to the vDSO and kernel linker scripts
Date: Mon, 11 Jun 2018 17:32:24 -0700	[thread overview]
Message-ID: <20180612003224.3658-4-labbott@redhat.com> (raw)
In-Reply-To: <20180612003224.3658-1-labbott@redhat.com>


Both the kernel and the vDSO need to have unique build ids.
Insert the build salt section to make the build ids unique.

Signed-off-by: Laura Abbott <labbott@redhat.com>
---
 arch/x86/entry/vdso/vdso-layout.lds.S | 3 ++-
 arch/x86/kernel/vmlinux.lds.S         | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso-layout.lds.S b/arch/x86/entry/vdso/vdso-layout.lds.S
index acfd5ba7d943..a331c1d41360 100644
--- a/arch/x86/entry/vdso/vdso-layout.lds.S
+++ b/arch/x86/entry/vdso/vdso-layout.lds.S
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/vdso.h>
-
+#include <asm-generic/vmlinux.lds.h>
 /*
  * Linker script for vDSO.  This is an ELF shared object prelinked to
  * its virtual address, and with only one read-only segment.
@@ -74,6 +74,7 @@ SECTIONS
 	.fake_shstrtab	: { *(.fake_shstrtab) }		:text
 
 
+	BUILD_SALT
 	.note		: { *(.note.*) }		:text	:note
 
 	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 5e1458f609a1..b61c33fa2617 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -172,6 +172,7 @@ SECTIONS
 		_edata = .;
 	} :data
 
+	BUILD_SALT
 	BUG_TABLE
 
 	ORC_UNWIND_TABLE
-- 
2.18.0.rc1


  parent reply	other threads:[~2018-06-12  0:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12  0:32 [PATCHv4 0/3] Salted build ids via linker sections Laura Abbott
2018-06-12  0:32 ` [PATCHv4 1/3] scripts: Preprocess module-common.lds Laura Abbott
2018-06-12  1:59   ` kbuild test robot
2018-06-12  6:03     ` Michael Ellerman
2018-06-12 18:18       ` Laura Abbott
2018-06-13  9:46         ` Michael Ellerman
2018-06-12  2:53   ` kbuild test robot
2018-06-13  2:03   ` Masahiro Yamada
2018-06-12  0:32 ` [PATCHv4 2/3] kbuild: Introduce build-salt linker section and config option Laura Abbott
2018-06-13  6:06   ` Masahiro Yamada
2018-06-14 21:38     ` Laura Abbott
2018-06-12  0:32 ` Laura Abbott [this message]
2018-06-21 12:43   ` [PATCHv4 3/3] x86: Add build salt to the vDSO and kernel linker scripts Ingo Molnar
2018-06-21 15:58     ` Laura Abbott
2018-06-28 13:56       ` Masahiro Yamada
2018-06-12  1:29 ` [PATCHv4 0/3] Salted build ids via linker sections Linus Torvalds
2018-06-12  6:53 ` Michael Ellerman

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=20180612003224.3658-4-labbott@redhat.com \
    --to=labbott@redhat.com \
    --cc=ccoutant@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mjw@fedoraproject.org \
    --cc=nickc@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.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