public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] avoid unnecessary recompilations in x86 boot code
@ 2024-02-20 19:21 Jann Horn
  2024-02-20 19:21 ` [PATCH 1/3] x86/boot: fix KASLR hashing to use full input Jann Horn
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jann Horn @ 2024-02-20 19:21 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86
  Cc: H. Peter Anvin, linux-kernel, Kees Cook, Jann Horn

It's been bugging me that every time I rebuild the kernel, kaslr.o and
misc.o get rebuilt just because they pull in one or two things from some
headers that change on every build. So this series moves them into a
separate file that should be faster to build.

This doesn't seem to actually make a difference in terms of wall clock
time, I think because these compiler invocations run in parallel with
kernel compression; but when I tested with an earlier version of this
patch series, I saw something like a 500ms reduction in CPU time used.

Not exactly a major win, and I guess CPU time isn't really the metric
that matters here, but still, I think this makes sense as a cleanup?


Jann Horn (3):
  x86/boot: fix KASLR hashing to use full input
  x86/boot: avoid recompiling misc.c for incremental rebuilds
  x86/boot: avoid recompiling kaslr.c for incremental rebuilds

 arch/x86/boot/compressed/Makefile       |  4 ++--
 arch/x86/boot/compressed/dynamic_vars.c | 17 +++++++++++++++
 arch/x86/boot/compressed/dynamic_vars.h | 14 ++++++++++++
 arch/x86/boot/compressed/kaslr.c        | 29 +++++++++++++++----------
 arch/x86/boot/compressed/misc.c         |  6 ++---
 5 files changed, 53 insertions(+), 17 deletions(-)
 create mode 100644 arch/x86/boot/compressed/dynamic_vars.c
 create mode 100644 arch/x86/boot/compressed/dynamic_vars.h

-- 
2.44.0.rc0.258.g7320e95886-goog


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

end of thread, other threads:[~2024-02-23 23:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 19:21 [PATCH 0/3] avoid unnecessary recompilations in x86 boot code Jann Horn
2024-02-20 19:21 ` [PATCH 1/3] x86/boot: fix KASLR hashing to use full input Jann Horn
2024-02-20 19:21 ` [PATCH 2/3] x86/boot: avoid recompiling misc.c for incremental rebuilds Jann Horn
2024-02-20 19:21 ` [PATCH 3/3] x86/boot: avoid recompiling kaslr.c " Jann Horn
2024-02-20 19:34   ` Kees Cook
2024-02-23 23:52   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox