* [PATCH] x86: Don't clare __force_order in kaslr_64.c
@ 2020-01-24 18:18 H.J. Lu
2020-01-24 18:24 ` Andy Lutomirski
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: H.J. Lu @ 2020-01-24 18:18 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H . Peter Anvin,
x86, Yu-cheng Yu
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.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
---
arch/x86/boot/compressed/kaslr_64.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr_64.c b/arch/x86/boot/compressed/kaslr_64.c
index 748456c365f4..9557c5a15b91 100644
--- a/arch/x86/boot/compressed/kaslr_64.c
+++ b/arch/x86/boot/compressed/kaslr_64.c
@@ -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;
--
2.24.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] x86: Don't clare __force_order in kaslr_64.c
2020-01-24 18:18 [PATCH] x86: Don't clare __force_order in kaslr_64.c H.J. Lu
@ 2020-01-24 18:24 ` Andy Lutomirski
2020-01-24 18:39 ` H.J. Lu
2020-02-17 22:27 ` [PATCH] x86: Don't clare " Borislav Petkov
2020-02-18 15:07 ` [tip: x86/boot] x86/boot/compressed: Don't declare " tip-bot2 for H.J. Lu
2020-02-19 16:32 ` [tip: x86/urgent] " tip-bot2 for H.J. Lu
2 siblings, 2 replies; 10+ messages in thread
From: Andy Lutomirski @ 2020-01-24 18:24 UTC (permalink / raw)
To: H.J. Lu
Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
H . Peter Anvin, x86, Yu-cheng Yu
> On Jan 24, 2020, at 10:18 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
> 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.
Why does anything actually define that variable? Surely any actual references are just an outright bug. Is it needed for LTO?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86: Don't clare __force_order in kaslr_64.c
2020-01-24 18:24 ` Andy Lutomirski
@ 2020-01-24 18:39 ` H.J. Lu
2020-01-24 18:44 ` [PATCH] x86: Don't declare " H.J. Lu
2020-02-17 22:27 ` [PATCH] x86: Don't clare " Borislav Petkov
1 sibling, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2020-01-24 18:39 UTC (permalink / raw)
To: Andy Lutomirski
Cc: LKML, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
H . Peter Anvin, the arch/x86 maintainers, Yu-cheng Yu
On Fri, Jan 24, 2020 at 10:24 AM Andy Lutomirski <luto@amacapital.net> wrote:
>
>
>
> > On Jan 24, 2020, at 10:18 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > 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.
>
> 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.
--
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] x86: Don't declare __force_order in kaslr_64.c
2020-01-24 18:39 ` H.J. Lu
@ 2020-01-24 18:44 ` H.J. Lu
2020-02-18 10:45 ` Borislav Petkov
0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2020-01-24 18:44 UTC (permalink / raw)
To: Andy Lutomirski
Cc: LKML, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
H . Peter Anvin, the arch/x86 maintainers, Yu-cheng Yu
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
On Fri, Jan 24, 2020 at 10:39 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Fri, Jan 24, 2020 at 10:24 AM Andy Lutomirski <luto@amacapital.net> wrote:
> >
> >
> >
> > > On Jan 24, 2020, at 10:18 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > >
> > > 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.
> >
> > 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".
--
H.J.
[-- Attachment #2: 0001-x86-Don-t-declare-__force_order-in-kaslr_64.c.patch --]
[-- Type: application/x-patch, Size: 1388 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86: Don't clare __force_order in kaslr_64.c
2020-01-24 18:24 ` Andy Lutomirski
2020-01-24 18:39 ` H.J. Lu
@ 2020-02-17 22:27 ` Borislav Petkov
1 sibling, 0 replies; 10+ messages in thread
From: Borislav Petkov @ 2020-02-17 22:27 UTC (permalink / raw)
To: Andy Lutomirski
Cc: H.J. Lu, linux-kernel, Thomas Gleixner, Ingo Molnar,
H . Peter Anvin, x86, Yu-cheng Yu
On Fri, Jan 24, 2020 at 10:24:19AM -0800, Andy Lutomirski wrote:
> 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
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86: Don't declare __force_order in kaslr_64.c
2020-01-24 18:44 ` [PATCH] x86: Don't declare " H.J. Lu
@ 2020-02-18 10:45 ` Borislav Petkov
2020-02-18 11:38 ` H.J. Lu
0 siblings, 1 reply; 10+ messages in thread
From: Borislav Petkov @ 2020-02-18 10:45 UTC (permalink / raw)
To: H.J. Lu
Cc: Andy Lutomirski, LKML, Thomas Gleixner, Ingo Molnar,
H . Peter Anvin, the arch/x86 maintainers, Yu-cheng Yu
On Fri, Jan 24, 2020 at 10:44:30AM -0800, H.J. Lu wrote:
> This updated patch fixed a typo in Subject: "care" -> "declare".
>
> From c8c26194cf5a344cd53763eaaf16c3ab609736f4 Mon Sep 17 00:00:00 2001
> From: "H.J. Lu" <hjl.tools@gmail.com>
> 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.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
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?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86: Don't declare __force_order in kaslr_64.c
2020-02-18 10:45 ` Borislav Petkov
@ 2020-02-18 11:38 ` H.J. Lu
2020-02-18 13:37 ` Borislav Petkov
0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2020-02-18 11:38 UTC (permalink / raw)
To: Borislav Petkov
Cc: Andy Lutomirski, LKML, Thomas Gleixner, Ingo Molnar,
H . Peter Anvin, the arch/x86 maintainers, Yu-cheng Yu
On Tue, Feb 18, 2020 at 2:45 AM Borislav Petkov <bp@alien8.de> wrote:
>
> On Fri, Jan 24, 2020 at 10:44:30AM -0800, H.J. Lu wrote:
> > This updated patch fixed a typo in Subject: "care" -> "declare".
> >
> > From c8c26194cf5a344cd53763eaaf16c3ab609736f4 Mon Sep 17 00:00:00 2001
> > From: "H.J. Lu" <hjl.tools@gmail.com>
> > 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.
> >
> > Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> > Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
>
> 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.
--
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] x86: Don't declare __force_order in kaslr_64.c
2020-02-18 11:38 ` H.J. Lu
@ 2020-02-18 13:37 ` Borislav Petkov
0 siblings, 0 replies; 10+ messages in thread
From: Borislav Petkov @ 2020-02-18 13:37 UTC (permalink / raw)
To: H.J. Lu
Cc: Andy Lutomirski, LKML, Thomas Gleixner, Ingo Molnar,
H . Peter Anvin, the arch/x86 maintainers, Yu-cheng Yu
On Tue, Feb 18, 2020 at 03:38:54AM -0800, H.J. Lu wrote:
> 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.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 10+ messages in thread
* [tip: x86/boot] x86/boot/compressed: Don't declare __force_order in kaslr_64.c
2020-01-24 18:18 [PATCH] x86: Don't clare __force_order in kaslr_64.c H.J. Lu
2020-01-24 18:24 ` Andy Lutomirski
@ 2020-02-18 15:07 ` tip-bot2 for H.J. Lu
2020-02-19 16:32 ` [tip: x86/urgent] " tip-bot2 for H.J. Lu
2 siblings, 0 replies; 10+ messages in thread
From: tip-bot2 for H.J. Lu @ 2020-02-18 15:07 UTC (permalink / raw)
To: linux-tip-commits; +Cc: H.J. Lu, Borislav Petkov, x86, LKML
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 <hjl.tools@gmail.com>
AuthorDate: Thu, 16 Jan 2020 12:46:51 -08:00
Committer: Borislav Petkov <bp@suse.de>
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.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200124181811.4780-1-hjl.tools@gmail.com
---
arch/x86/boot/compressed/kaslr_64.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr_64.c b/arch/x86/boot/compressed/kaslr_64.c
index 748456c..9557c5a 100644
--- a/arch/x86/boot/compressed/kaslr_64.c
+++ b/arch/x86/boot/compressed/kaslr_64.c
@@ -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;
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [tip: x86/urgent] x86/boot/compressed: Don't declare __force_order in kaslr_64.c
2020-01-24 18:18 [PATCH] x86: Don't clare __force_order in kaslr_64.c H.J. Lu
2020-01-24 18:24 ` Andy Lutomirski
2020-02-18 15:07 ` [tip: x86/boot] x86/boot/compressed: Don't declare " tip-bot2 for H.J. Lu
@ 2020-02-19 16:32 ` tip-bot2 for H.J. Lu
2 siblings, 0 replies; 10+ messages in thread
From: tip-bot2 for H.J. Lu @ 2020-02-19 16:32 UTC (permalink / raw)
To: linux-tip-commits; +Cc: H.J. Lu, Borislav Petkov, x86, LKML
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 <hjl.tools@gmail.com>
AuthorDate: Thu, 16 Jan 2020 12:46:51 -08:00
Committer: Borislav Petkov <bp@suse.de>
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.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200124181811.4780-1-hjl.tools@gmail.com
---
arch/x86/boot/compressed/kaslr_64.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/boot/compressed/kaslr_64.c b/arch/x86/boot/compressed/kaslr_64.c
index 748456c..9557c5a 100644
--- a/arch/x86/boot/compressed/kaslr_64.c
+++ b/arch/x86/boot/compressed/kaslr_64.c
@@ -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;
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-02-19 16:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 18:18 [PATCH] x86: Don't clare __force_order in kaslr_64.c H.J. Lu
2020-01-24 18:24 ` Andy Lutomirski
2020-01-24 18:39 ` H.J. Lu
2020-01-24 18:44 ` [PATCH] x86: Don't declare " H.J. Lu
2020-02-18 10:45 ` Borislav Petkov
2020-02-18 11:38 ` H.J. Lu
2020-02-18 13:37 ` Borislav Petkov
2020-02-17 22:27 ` [PATCH] x86: Don't clare " Borislav Petkov
2020-02-18 15:07 ` [tip: x86/boot] x86/boot/compressed: Don't declare " tip-bot2 for H.J. Lu
2020-02-19 16:32 ` [tip: x86/urgent] " tip-bot2 for H.J. Lu
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).