x86: Don't clare __force_order in kaslr_64.c
PATCH 1/1 x86: Don't clare __force_order in kaslr_64.c
GCC 10 changed the default to -fno-common, which leads to
LD arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119: arch/x86/boot/compressed/vmlinux] Error 1
Since __force_order is already provided in pgtable_64.c, there is no need to declare __force_order in kaslr_64.c.
--- arch/x86/boot/compressed/kaslr_64.c | 3 --- 1 file changed, 3 deletions(-)
arch/x86/boot/compressed/kaslr_64.c +0 -3
@@ -29,9 +29,6 @@#define __PAGE_OFFSET __PAGE_OFFSET_BASE#include "../../mm/ident_map.c" -/* Used by pgtable.h asm code to force instruction serialization. */ -unsigned long __force_order; -/* Used to track our page table allocation area. */ struct alloc_pgt_data {unsigned char *pgt_buf;
Signature · 1 line
2.24.1
Quoted 12 lines · H.J. Lu
GCC 10 changed the default to -fno-common, which leads to
LD
arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119:arch/x86/boot/compressed/vmlinux] Error 1Since
__force_orderis already provided inpgtable_64.c, there is no need to declare__force_orderinkaslr_64.c.
Why does anything actually define that variable? Surely any actual references are just an outright bug. Is it needed for LTO?
Quoted 7 lines · Andy Lutomirski
Quoted 7 lines · H.J. Lu
GCC 10 changed the default to -fno-common, which leads to
Quoted 8 lines
Quoted 6 lines
LD
arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119:arch/x86/boot/compressed/vmlinux] Error 1Since
__force_orderis already provided inpgtable_64.c, there is no need to declare__force_orderinkaslr_64.c.Why does anything actually define that variable? Surely any actual references are just an outright bug. Is it needed for LTO?
It is needed by GCC 10 without LTO.
Signature · 1 line
H.J.
PATCH 1/1 x86: Don't declare __force_order in kaslr_64.c
Quoted 13 lines · H.J. Lu
Quoted 11 lines · Andy Lutomirski
Quoted 11 lines · H.J. Lu
GCC 10 changed the default to -fno-common, which leads to
LD
arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119:arch/x86/boot/compressed/vmlinux] Error 1
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Since
__force_orderis already provided inpgtable_64.c, there is no need to declare__force_orderinkaslr_64.c.Why does anything actually define that variable? Surely any actual references are just an outright bug. Is it needed for LTO?
It is needed by GCC 10 without LTO.
This updated patch fixed a typo in Subject: "care" -> "declare".
Signature · 1 line
H.J.
From c8c26194cf5a344cd53763eaaf16c3ab609736f4 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Thu, 16 Jan 2020 12:46:51 -0800
Subject: [PATCH] x86: Don't declare __force_order in kaslr_64.c
GCC 10 changed the default to -fno-common, which leads to
LD arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119: arch/x86/boot/compressed/vmlinux] Error 1
Since __force_order is already provided in pgtable_64.c, there is no need to declare __force_order in kaslr_64.c.
--- arch/x86/boot/compressed/kaslr_64.c | 3 --- 1 file changed, 3 deletions(-)
arch/x86/boot/compressed/kaslr_64.c +0 -3
@@ -29,9 +29,6 @@#define __PAGE_OFFSET __PAGE_OFFSET_BASE#include "../../mm/ident_map.c" -/* Used by pgtable.h asm code to force instruction serialization. */ -unsigned long __force_order; -/* Used to track our page table allocation area. */ struct alloc_pgt_data {unsigned char *pgt_buf;
Signature · 1 line
2.24.1
Borislav Petkov
maintainerRe: [PATCH] x86: Don't declare __force_order in kaslr_64.c
Quoted 13 lines · H.J. Lu
This updated patch fixed a typo in Subject: "care" -> "declare".
From
c8c26194cf5a344cd53763eaaf16c3ab609736f4Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Thu, 16 Jan 2020 12:46:51 -0800
Subject: [PATCH] x86: Don't declare__force_orderinkaslr_64.cGCC 10 changed the default to -fno-common, which leads to
LD
arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119:arch/x86/boot/compressed/vmlinux] Error 1
Quoted 5 lines
Since
__force_orderis already provided inpgtable_64.c, there is no need to declare__force_orderinkaslr_64.c.Signed-off-by H.J. Lu <[email protected]>Signed-off-by Yu-cheng Yu <[email protected]>
What is Yu-cheng's SOB supposed to mean here?
The only case where it would make sense is if he's sending this patch but he isn't. So what's up?
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteRe: [PATCH] x86: Don't declare __force_order in kaslr_64.c
Quoted 18 lines · Borislav Petkov
Quoted 16 lines · H.J. Lu
This updated patch fixed a typo in Subject: "care" -> "declare".
From
c8c26194cf5a344cd53763eaaf16c3ab609736f4Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Thu, 16 Jan 2020 12:46:51 -0800
Subject: [PATCH] x86: Don't declare__force_orderinkaslr_64.cGCC 10 changed the default to -fno-common, which leads to
LD
arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119:arch/x86/boot/compressed/vmlinux] Error 1Since
__force_orderis already provided inpgtable_64.c, there is no need to declare__force_orderinkaslr_64.c.
Quoted 8 lines
Quoted 2 lines
Signed-off-by H.J. Lu <[email protected]>Signed-off-by Yu-cheng Yu <[email protected]>What is Yu-cheng's SOB supposed to mean here?
The only case where it would make sense is if he's sending this patch but he isn't. So what's up?
I wrote this patch as the part of the previous CET patch set Yu-cheng submitted. Since this is a standalone patch, he asked me to send it separately. I didn't remove Yu-cheng's SOB when I submitted this patch.
Signature · 1 line
H.J.
Borislav Petkov
maintainerRe: [PATCH] x86: Don't declare __force_order in kaslr_64.c
Quoted 3 lines · H.J. Lu
I wrote this patch as the part of the previous CET patch set Yu-cheng submitted. Since this is a standalone patch, he asked me to send it separately. I didn't remove Yu-cheng's SOB when I submitted this patch.
Ok, dropping it.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteBorislav Petkov
maintainerQuoted 2 lines · Andy Lutomirski
Why does anything actually define that variable? Surely any actual references are just an outright bug. Is it needed for LTO?
I think the answer to your question is at the top of arch/x86/include/asm/special_insns.h
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette[tip: x86/boot] x86/boot/compressed: Don't declare __force_order in kaslr_64.c
In reply to H.J. LuThe following commit has been merged into the x86/boot branch of tip:
The following commit has been merged into the x86/boot branch of tip:
Commit-ID: 970b41399925e34fdf5783a53fe8cc73f04fec37 Gitweb: https://git.kernel.org/tip/970b41399925e34fdf5783a53fe8cc73f04fec37 Author: H.J. Lu <[email protected]> AuthorDate: Thu, 16 Jan 2020 12:46:51 -08:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Tue, 18 Feb 2020 14:40:53 +01:00
x86/boot/compressed: Don't declare __force_order in kaslr_64.c
GCC 10 changed the default to -fno-common, which leads to
LD arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119: arch/x86/boot/compressed/vmlinux] Error 1
Since __force_order is already provided in pgtable_64.c, there is no need to declare __force_order in kaslr_64.c.
--- arch/x86/boot/compressed/kaslr_64.c | 3 --- 1 file changed, 3 deletions(-)
arch/x86/boot/compressed/kaslr_64.c +0 -3
@@ -29,9 +29,6 @@#define __PAGE_OFFSET __PAGE_OFFSET_BASE#include "../../mm/ident_map.c" -/* Used by pgtable.h asm code to force instruction serialization. */ -unsigned long __force_order; -/* Used to track our page table allocation area. */ struct alloc_pgt_data {unsigned char *pgt_buf;
[tip: x86/urgent] x86/boot/compressed: Don't declare __force_order in kaslr_64.c
In reply to H.J. LuThe following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: df6d4f9db79c1a5d6f48b59db35ccd1e9ff9adfc Gitweb: https://git.kernel.org/tip/df6d4f9db79c1a5d6f48b59db35ccd1e9ff9adfc Author: H.J. Lu <[email protected]> AuthorDate: Thu, 16 Jan 2020 12:46:51 -08:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 19 Feb 2020 17:23:59 +01:00
x86/boot/compressed: Don't declare __force_order in kaslr_64.c
GCC 10 changed the default to -fno-common, which leads to
LD arch/x86/boot/compressed/vmlinux
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[2]: *** [arch/x86/boot/compressed/Makefile:119: arch/x86/boot/compressed/vmlinux] Error 1
Since __force_order is already provided in pgtable_64.c, there is no need to declare __force_order in kaslr_64.c.
--- arch/x86/boot/compressed/kaslr_64.c | 3 --- 1 file changed, 3 deletions(-)
arch/x86/boot/compressed/kaslr_64.c +0 -3
@@ -29,9 +29,6 @@#define __PAGE_OFFSET __PAGE_OFFSET_BASE#include "../../mm/ident_map.c" -/* Used by pgtable.h asm code to force instruction serialization. */ -unsigned long __force_order; -/* Used to track our page table allocation area. */ struct alloc_pgt_data {unsigned char *pgt_buf;