linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv4 0/3] Salted build ids via linker sections
@ 2018-06-12  0:32 Laura Abbott
  2018-06-12  0:32 ` [PATCHv4 1/3] scripts: Preprocess module-common.lds Laura Abbott
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Laura Abbott @ 2018-06-12  0:32 UTC (permalink / raw)
  To: Andy Lutomirski, mjw, H . J . Lu, Masahiro Yamada
  Cc: Laura Abbott, Linus Torvalds, X86 ML, linux-kernel, Nick Clifton,
	Cary Coutant, linux-kbuild


Hi,

This is v4 of the series to allow unique build ids in the kernel. As a
reminder of the context:

""
In Fedora, the debug information is packaged separately (foo-debuginfo) and
can be installed separately. There's been a long standing issue where only one
version of a debuginfo info package can be installed at a time. Mark Wielaard
made an effort for Fedora 27 to allow parallel installation of debuginfo (see
https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo for
more details)

Part of the requirement to allow this to work is that build ids are
unique between builds. The existing upstream rpm implementation ensures
this by re-calculating the build-id using the version and release as a
seed. This doesn't work 100% for the kernel because of the vDSO which is
its own binary and doesn't get updated. After poking holes in a few of my
ideas, there was a discussion with some people from the binutils team about
adding --build-id-salt to let ld do the calculation debugedit is doing. There
was a counter proposal made to add in the salt while building. The
easiest proposal was to add an item in the linker script vs. linking in
an object since we need the salt to go in every module as well as the
kernel and vmlinux.
""

v4 takes Linus' suggestion of using linker fill to insert the build id.
This removes the need to use a generated header which makes things much
easier. One change is that because this section isn't .comment it won't
get stripped automatically. This is pretty small but I also know people
can be picky so I'm open to opinions or suggestions here.

Laura Abbott (3):
  scripts: Preprocess module-common.lds
  kbuild: Introduce build-salt linker section and config option
  x86: Add build salt to the vDSO and kernel linker scripts

 arch/x86/entry/vdso/vdso-layout.lds.S              | 3 ++-
 arch/x86/kernel/vmlinux.lds.S                      | 1 +
 include/asm-generic/vmlinux.lds.h                  | 6 ++++++
 init/Kconfig                                       | 9 +++++++++
 scripts/.gitignore                                 | 1 +
 scripts/Makefile                                   | 2 +-
 scripts/{module-common.lds => module-common.lds.S} | 4 ++++
 7 files changed, 24 insertions(+), 2 deletions(-)
 rename scripts/{module-common.lds => module-common.lds.S} (94%)

-- 
2.18.0.rc1


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

end of thread, other threads:[~2018-06-28 13:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCHv4 3/3] x86: Add build salt to the vDSO and kernel linker scripts Laura Abbott
2018-06-21 12:43   ` 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

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).