Skip to contentSkip to conversation

x86/vdso: Add ARCH_MAP_VDSO_X32 if CONFIG_X86_X32_ABI.

PATCH In review Vinson Lee 3 participants 3 messages Sep 17, 2016 – Sep 19, 2016 x86

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 x86/vdso: Add ARCH_MAP_VDSO_X32 if CONFIG_X86_X32_ABI.

vdso_image_x32 is generated if CONFIG_X86_X32_ABI.

This patch fixes this build error on CentOS 6.8 with gcc 4.4.

LD init/built-in.o
arch/x86/built-in.o: In function `do_arch_prctl':
(.text+0x27466): undefined reference to vdso_image_x32' arch/x86/built-in.o: In function do_arch_prctl':
(.text+0x27477): undefined reference to `vdso_image_x32'

Fixes 2eefd8789698 ("x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*")
---
 arch/x86/kernel/process_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/process_64.c +1 -1
index b34caea..b3760b3 100644
@@ -592,7 +592,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
 	}
 
 #ifdef CONFIG_CHECKPOINT_RESTORE
-# ifdef CONFIG_X86_X32
+# ifdef CONFIG_X86_X32_ABI
 	case ARCH_MAP_VDSO_X32:
 		return prctl_map_vdso(&vdso_image_x32, addr);
 # endif
Signature · 1 line
1.7.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Vinson Lee

vdso_image_x32 is generated if CONFIG_X86_X32_ABI.

This patch fixes this build error on CentOS 6.8 with gcc 4.4.

Quoted 8 lines

LD init/built-in.o
arch/x86/built-in.o: In function `do_arch_prctl':
(.text+0x27466): undefined reference to vdso_image_x32' arch/x86/built-in.o: In function do_arch_prctl':
(.text+0x27477): undefined reference to `vdso_image_x32'

Fixes 2eefd8789698 ("x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*")

Thanks!

Ifdeffery in arch/x86/include/asm/vdso.h dazzled my eyes.

Signature · 1 line
             Dmitry
#2 lore raw

[tip:x86/vdso] x86/vdso: Use CONFIG_X86_X32_ABI to enable vdso prctl

In reply to Vinson Lee
x86/vdso: Use CONFIG_X86_X32_ABI to enable vdso prctl
Commit-ID:  6e68b08728ce3365c713f8663c6b05a79e2bbca1
Gitweb:     http://git.kernel.org/tip/6e68b08728ce3365c713f8663c6b05a79e2bbca1
Author:     Vinson Lee <[email protected]>
AuthorDate: Sat, 17 Sep 2016 00:51:53 +0000
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 20 Sep 2016 00:01:48 +0200

x86/vdso: Use CONFIG_X86_X32_ABI to enable vdso prctl

The prctl code which references vdso_image_x32 is built when CONFIG_X86_X32 is set. This results in the following build failure:

LD init/built-in.o
arch/x86/built-in.o: In function `do_arch_prctl':
(.text+0x27466): undefined reference to `vdso_image_x32'

vdso_image_x32 depends on CONFIG_X86_X32_ABI. So we need to make the prctl depend on that as well.

[ tglx: Massaged changelog ]

Fixes 2eefd8789698 ("x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*")
Cc Andy Lutomirski <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dmitry Vyukov <[email protected]>
---
 arch/x86/kernel/process_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/process_64.c +1 -1
index b26a009..b4603b7 100644
@@ -592,7 +592,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
 	}
 
 #ifdef CONFIG_CHECKPOINT_RESTORE
-# ifdef CONFIG_X86_X32
+# ifdef CONFIG_X86_X32_ABI
 	case ARCH_MAP_VDSO_X32:
 		return prctl_map_vdso(&vdso_image_x32, addr);
 # endif