History

powerpc/book3e: get rid of #include <generated/compile.h>

You cannot include <generated/compile.h> here because it is generated in init/Makefile but there is no guarantee that it happens before arch/powerpc/mm/nohash/kaslr_booke.c is compiled for parallel builds. The places where you can reliably include <generated/compile.h> are: - init/ (because init/Makefile can specify the dependency) - arch/*/boot/ (because it is compiled after vmlinux) Commit f231e4333312 ("hexagon: get rid of #include <generated/compile.h>") fixed the last breakage at that time, but powerpc re-added this. <generated/compile.h> was unneeded because 'build_str' is almost the same as 'linux_banner' defined in init/version.c Let's copy the solution from MIPS. (get_random_boot() in arch/mips/kernel/relocate.c)

Masahiro Yamada committed 4 years ago

Commit 7ad4bd81 parent 3e8635f1 file · +2 −6Browse files

Unified · Split

arch/powerpc/mm/nohash/kaslr_booke.c+2−6
@@ -19,7 +19,6 @@ · 18 unmodified lines
1919 #include <asm/cacheflush.h>
2020 #include <asm/kdump.h>
2121 #include <mm/mmu_decl.h>
22−#include <generated/compile.h>
2322 #include <generated/utsrelease.h>
2423
2524 struct regions {
@@ -37,10 +36,6 @@ struct regions { · 11 unmodified lines
3736 int reserved_mem_size_cells;
3837 };
3938
40−/* Simplified build-specific string for starting entropy. */
41−static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
42− LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;
43−
4439 struct regions __initdata regions;
4540
4641 static __init void kaslr_get_cmdline(void *fdt)
@@ -71,7 +66,8 @@ static unsigned long __init get_boot_seed(void *fdt) · 24 unmodified lines
7166 {
7267 unsigned long hash = 0;
7368
74− hash = rotate_xor(hash, build_str, sizeof(build_str));
69+ /* build-specific string for starting entropy. */
70+ hash = rotate_xor(hash, linux_banner, strlen(linux_banner));
7571 hash = rotate_xor(hash, fdt, fdt_totalsize(fdt));
7672
7773 return hash;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t