]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.169/x86-vdso-drop-implicit-common-page-size-linker-flag.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.169 / x86-vdso-drop-implicit-common-page-size-linker-flag.patch
CommitLineData
45d80ddf
SL
1From 2e75212a5370ef38178eeb09e8bf3a2c513dbda6 Mon Sep 17 00:00:00 2001
2From: Nick Desaulniers <ndesaulniers@google.com>
3Date: Thu, 6 Dec 2018 11:12:31 -0800
4Subject: x86/vdso: Drop implicit common-page-size linker flag
5
6GNU linker's -z common-page-size's default value is based on the target
7architecture. arch/x86/entry/vdso/Makefile sets it to the architecture
8default, which is implicit and redundant. Drop it.
9
10Fixes: 2aae950b21e4 ("x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu")
11Reported-by: Dmitry Golovin <dima@golovin.in>
12Reported-by: Bill Wendling <morbo@google.com>
13Suggested-by: Dmitry Golovin <dima@golovin.in>
14Suggested-by: Rui Ueyama <ruiu@google.com>
15Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
16Signed-off-by: Borislav Petkov <bp@suse.de>
17Acked-by: Andy Lutomirski <luto@kernel.org>
18Cc: Andi Kleen <andi@firstfloor.org>
19Cc: Fangrui Song <maskray@google.com>
20Cc: "H. Peter Anvin" <hpa@zytor.com>
21Cc: Ingo Molnar <mingo@redhat.com>
22Cc: Thomas Gleixner <tglx@linutronix.de>
23Cc: x86-ml <x86@kernel.org>
24Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulniers@google.com
25Link: https://bugs.llvm.org/show_bug.cgi?id=38774
26Link: https://github.com/ClangBuiltLinux/linux/issues/31
27Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
28Signed-off-by: Sasha Levin <sashal@kernel.org>
29---
30 arch/x86/entry/vdso/Makefile | 4 ++--
31 1 file changed, 2 insertions(+), 2 deletions(-)
32
33diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
34index 2ae92c6b1de6..756dc9432d15 100644
35--- a/arch/x86/entry/vdso/Makefile
36+++ b/arch/x86/entry/vdso/Makefile
37@@ -48,7 +48,7 @@ targets += $(vdso_img_sodbg)
38 export CPPFLAGS_vdso.lds += -P -C
39
40 VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \
41- -z max-page-size=4096 -z common-page-size=4096
42+ -z max-page-size=4096
43
44 $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE
45 $(call if_changed,vdso)
46@@ -95,7 +95,7 @@ CFLAGS_REMOVE_vvar.o = -pg
47
48 CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds)
49 VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \
50- -z max-page-size=4096 -z common-page-size=4096
51+ -z max-page-size=4096
52
53 # 64-bit objects to re-brand as x32
54 vobjs64-for-x32 := $(filter-out $(vobjs-nox32),$(vobjs-y))
55--
562.19.1
57