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