mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/boot: fix kaslr-enabled build
@ 2020-01-29 16:29 Sergey Senozhatsky
  2020-01-30 11:00 ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Senozhatsky @ 2020-01-29 16:29 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Borislav Petkov, Peter Anvin, x86, linux-kernel, Sergey Senozhatsky

Both pgtable_64 and kaslr_64 define `__force_order', which breaks
the build:

ld: arch/x86/boot/compressed/pgtable_64.o:(.bss+0x0): multiple definition of `__force_order';
arch/x86/boot/compressed/kaslr_64.o:(.bss+0x0): first defined here

Make KASLR use extern pgtable_64's definition.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 arch/x86/boot/compressed/kaslr_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/kaslr_64.c b/arch/x86/boot/compressed/kaslr_64.c
index 748456c365f4..274df8f9e659 100644
--- a/arch/x86/boot/compressed/kaslr_64.c
+++ b/arch/x86/boot/compressed/kaslr_64.c
@@ -30,7 +30,7 @@
 #include "../../mm/ident_map.c"
 
 /* Used by pgtable.h asm code to force instruction serialization. */
-unsigned long __force_order;
+extern unsigned long __force_order;
 
 /* Used to track our page table allocation area. */
 struct alloc_pgt_data {
-- 
2.25.0


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

end of thread, other threads:[~2020-01-30 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 16:29 [PATCH] x86/boot: fix kaslr-enabled build Sergey Senozhatsky
2020-01-30 11:00 ` Borislav Petkov
2020-01-30 11:31   ` Sergey Senozhatsky
2020-01-30 11:36     ` Borislav Petkov
2020-01-30 11:46       ` Sergey Senozhatsky

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

all inboxes | Powered by JetHome®