x86: vDSO fixes
A message that is not in the archive (sent off-list or not yet received): 532b9195.3C8GzQgSVEquG2Tq%[email protected]
cover x86: vDSO fixes
Patch 1 fixes the Xen build. Patch 2 fixes an embarrassment.
Andy Lutomirski (2):
x86: Move more vdso definitions into vdso.h
x86: Finish removing VDSO32_PRELINK
arch/x86/include/asm/vdso.h | 38 +++++++++++++++++++++++++++++++++++++- arch/x86/vdso/vdso.S | 2 +- arch/x86/vdso/vdso32-setup.c | 7 ------- arch/x86/vdso/vdso32.S | 2 +- arch/x86/vdso/vdso_image.h | 30 ------------------------------ arch/x86/vdso/vdsox32.S | 2 +- arch/x86/vdso/vma.c | 1 - 7 files changed, 40 insertions(+), 42 deletions(-) delete mode 100644 arch/x86/vdso/vdso_image.h
Signature · 1 line
1.8.5.3
PATCH 1/2 x86: Move more vdso definitions into vdso.h
This fixes the Xen build and gets rid of a silly header file.
--- arch/x86/include/asm/vdso.h | 38 ++++++++++++++++++++++++++++++++++++++ arch/x86/vdso/vdso.S | 2 +- arch/x86/vdso/vdso32-setup.c | 7 ------- arch/x86/vdso/vdso32.S | 2 +- arch/x86/vdso/vdso_image.h | 30 ------------------------------ arch/x86/vdso/vdsox32.S | 2 +- arch/x86/vdso/vma.c | 1 - 7 files changed, 41 insertions(+), 41 deletions(-) delete mode 100644 arch/x86/vdso/vdso_image.h
arch/x86/include/asm/vdso.h +38 -0
@@ -1,10 +1,46 @@#ifndef _ASM_X86_VDSO_H#define _ASM_X86_VDSO_H +#include <asm/page_types.h> +#include <linux/linkage.h> + +#ifdef __ASSEMBLER__ + +#define DEFINE_VDSO_IMAGE(symname, filename) \ +__PAGE_ALIGNED_DATA ; \ + .globl symname##_start, symname##_end ; \ + .align PAGE_SIZE ; \ + symname##_start: ; \ + .incbin filename ; \ + symname##_end: ; \ + .align PAGE_SIZE /* extra data here leaks to userspace. */ ; \ + \ +.previous ; \ + \ + .globl symname##_pages ; \ + .bss ; \ + .align 8 ; \ + .type symname##_pages, @object ; \ + symname##_pages: ; \ + .zero (symname##_end - symname##_start + PAGE_SIZE - 1) / PAGE_SIZE * (BITS_PER_LONG / 8) ; \ + .size symname##_pages, .-symname##_pages + +#else + +#define DECLARE_VDSO_IMAGE (symname) \ + extern char symname##_start[], symname##_end[]; \ + extern struct page *symname##_pages[] +#if definedCONFIG_X86_32 || definedCONFIG_COMPAT #include <asm/vdso32.h> +DECLARE_VDSO_IMAGE (vdso32_int80); +#ifdef CONFIG_COMPAT +DECLARE_VDSO_IMAGE (vdso32_syscall); +#endif +DECLARE_VDSO_IMAGE (vdso32_sysenter); +extern const char VDSO32_PRELINK [];/*
@@ -27,4 +63,6 @@ extern void __user __kernel_rt_sigreturn;void __init patch_vdso32 (void *vdso,size_t len); +#endif /* __ASSEMBLER__ */ +#endif /* _ASM_X86_VDSO_H */
arch/x86/vdso/vdso.S +1 -1
@@ -1,3 +1,3 @@ -#include "vdso_image.h" +#include <asm/vdso.h> DEFINE_VDSO_IMAGE(vdso, "arch/x86/vdso/vdso.so")
arch/x86/vdso/vdso32-setup.c +0 -7
@@ -29,7 +29,6 @@#include <asm/fixmap.h> #include <asm/hpet.h> #include <asm/vvar.h> -#include "vdso_image.h" #ifdef CONFIG_COMPAT_VDSO #define VDSO_DEFAULT 0
@@ -42,12 +41,6 @@#define arch_setup_additional_pages syscall32_setup_pages#endif -DECLARE_VDSO_IMAGE (vdso32_int80); -#ifdef CONFIG_COMPAT -DECLARE_VDSO_IMAGE (vdso32_syscall); -#endif -DECLARE_VDSO_IMAGE (vdso32_sysenter); -/* * Should the kernel map a VDSO page into processes and pass its * address down to glibc upon exec()?
arch/x86/vdso/vdso32.S +1 -1
@@ -1,4 +1,4 @@ -#include "vdso_image.h" +#include <asm/vdso.h> DEFINE_VDSO_IMAGE(vdso32_int80, "arch/x86/vdso/vdso32-int80.so")
arch/x86/vdso/vdso_image.h deleted +0 -30
@@ -1,30 +0,0 @@ -#ifndef _VDSO_IMAGE_H -#define _VDSO_IMAGE_H - -#include <asm/page_types.h> -#include <linux/linkage.h> - -#define DEFINE_VDSO_IMAGE(symname, filename) \ -__PAGE_ALIGNED_DATA ; \ - .globl symname##_start, symname##_end ; \ - .align PAGE_SIZE ; \ - symname##_start: ; \ - .incbin filename ; \ - symname##_end: ; \ - .align PAGE_SIZE /* extra data here leaks to userspace. */ ; \ - \ -.previous ; \ - \ - .globl symname##_pages ; \ - .bss ; \ - .align 8 ; \ - .type symname##_pages, @object ; \ - symname##_pages: ; \ - .zero (symname##_end - symname##_start + PAGE_SIZE - 1) / PAGE_SIZE * (BITS_PER_LONG / 8) ; \ - .size symname##_pages, .-symname##_pages - -#define DECLARE_VDSO_IMAGE (symname) \ - extern char symname##_start[], symname##_end[]; \ - extern struct page *symname##_pages[] - -#endif /* _VDSO_IMAGE_H */
arch/x86/vdso/vdsox32.S +1 -1
@@ -1,3 +1,3 @@ -#include "vdso_image.h" +#include <asm/vdso.h> DEFINE_VDSO_IMAGE(vdsox32, "arch/x86/vdso/vdsox32.so")
arch/x86/vdso/vma.c +0 -1
@@ -15,7 +15,6 @@#include <asm/proto.h> #include <asm/vdso.h> #include <asm/page.h> -#include "vdso_image.h" #if defined(CONFIG_X86_64 )unsigned int __read_mostly vdso_enabled =1 ;
Signature · 1 line
1.8.5.3
tip-bot for Andy Lutomirski
merge bot[tip:x86/vdso] x86, vdso: Move more vdso definitions into vdso.h
x86, vdso: Move more vdso definitions into vdso.h
Commit-ID: 9e6f450f946d35d585798da268d45c679632fe05 Gitweb: http://git.kernel.org/tip/9e6f450f946d35d585798da268d45c679632fe05 Author: Andy Lutomirski <[email protected]> AuthorDate: Thu, 20 Mar 2014 18:57:18 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Thu, 20 Mar 2014 20:20:08 -0700
x86, vdso: Move more vdso definitions into vdso.h
This fixes the Xen build and gets rid of a silly header file.
--- arch/x86/include/asm/vdso.h | 38 ++++++++++++++++++++++++++++++++++++++ arch/x86/vdso/vdso.S | 2 +- arch/x86/vdso/vdso32-setup.c | 7 ------- arch/x86/vdso/vdso32.S | 2 +- arch/x86/vdso/vdso_image.h | 30 ------------------------------ arch/x86/vdso/vdsox32.S | 2 +- arch/x86/vdso/vma.c | 1 - 7 files changed, 41 insertions(+), 41 deletions(-)
arch/x86/include/asm/vdso.h +38 -0
@@ -1,10 +1,46 @@#ifndef _ASM_X86_VDSO_H#define _ASM_X86_VDSO_H +#include <asm/page_types.h> +#include <linux/linkage.h> + +#ifdef __ASSEMBLER__ + +#define DEFINE_VDSO_IMAGE(symname, filename) \ +__PAGE_ALIGNED_DATA ; \ + .globl symname##_start, symname##_end ; \ + .align PAGE_SIZE ; \ + symname##_start: ; \ + .incbin filename ; \ + symname##_end: ; \ + .align PAGE_SIZE /* extra data here leaks to userspace. */ ; \ + \ +.previous ; \ + \ + .globl symname##_pages ; \ + .bss ; \ + .align 8 ; \ + .type symname##_pages, @object ; \ + symname##_pages: ; \ + .zero (symname##_end - symname##_start + PAGE_SIZE - 1) / PAGE_SIZE * (BITS_PER_LONG / 8) ; \ + .size symname##_pages, .-symname##_pages + +#else + +#define DECLARE_VDSO_IMAGE (symname) \ + extern char symname##_start[], symname##_end[]; \ + extern struct page *symname##_pages[] +#if definedCONFIG_X86_32 || definedCONFIG_COMPAT #include <asm/vdso32.h> +DECLARE_VDSO_IMAGE (vdso32_int80); +#ifdef CONFIG_COMPAT +DECLARE_VDSO_IMAGE (vdso32_syscall); +#endif +DECLARE_VDSO_IMAGE (vdso32_sysenter); +extern const char VDSO32_PRELINK [];/*
@@ -27,4 +63,6 @@ extern void __user __kernel_rt_sigreturn;void __init patch_vdso32 (void *vdso,size_t len); +#endif /* __ASSEMBLER__ */ +#endif /* _ASM_X86_VDSO_H */
arch/x86/vdso/vdso.S +1 -1
@@ -1,3 +1,3 @@ -#include "vdso_image.h" +#include <asm/vdso.h> DEFINE_VDSO_IMAGE(vdso, "arch/x86/vdso/vdso.so")
arch/x86/vdso/vdso32-setup.c +0 -7
@@ -29,7 +29,6 @@#include <asm/fixmap.h> #include <asm/hpet.h> #include <asm/vvar.h> -#include "vdso_image.h" #ifdef CONFIG_COMPAT_VDSO #define VDSO_DEFAULT 0
@@ -42,12 +41,6 @@#define arch_setup_additional_pages syscall32_setup_pages#endif -DECLARE_VDSO_IMAGE (vdso32_int80); -#ifdef CONFIG_COMPAT -DECLARE_VDSO_IMAGE (vdso32_syscall); -#endif -DECLARE_VDSO_IMAGE (vdso32_sysenter); -/* * Should the kernel map a VDSO page into processes and pass its * address down to glibc upon exec()?
arch/x86/vdso/vdso32.S +1 -1
@@ -1,4 +1,4 @@ -#include "vdso_image.h" +#include <asm/vdso.h> DEFINE_VDSO_IMAGE(vdso32_int80, "arch/x86/vdso/vdso32-int80.so")
arch/x86/vdso/vdso_image.h deleted +0 -30
@@ -1,30 +0,0 @@ -#ifndef _VDSO_IMAGE_H -#define _VDSO_IMAGE_H - -#include <asm/page_types.h> -#include <linux/linkage.h> - -#define DEFINE_VDSO_IMAGE(symname, filename) \ -__PAGE_ALIGNED_DATA ; \ - .globl symname##_start, symname##_end ; \ - .align PAGE_SIZE ; \ - symname##_start: ; \ - .incbin filename ; \ - symname##_end: ; \ - .align PAGE_SIZE /* extra data here leaks to userspace. */ ; \ - \ -.previous ; \ - \ - .globl symname##_pages ; \ - .bss ; \ - .align 8 ; \ - .type symname##_pages, @object ; \ - symname##_pages: ; \ - .zero (symname##_end - symname##_start + PAGE_SIZE - 1) / PAGE_SIZE * (BITS_PER_LONG / 8) ; \ - .size symname##_pages, .-symname##_pages - -#define DECLARE_VDSO_IMAGE (symname) \ - extern char symname##_start[], symname##_end[]; \ - extern struct page *symname##_pages[] - -#endif /* _VDSO_IMAGE_H */
arch/x86/vdso/vdsox32.S +1 -1
@@ -1,3 +1,3 @@ -#include "vdso_image.h" +#include <asm/vdso.h> DEFINE_VDSO_IMAGE(vdsox32, "arch/x86/vdso/vdsox32.so")
arch/x86/vdso/vma.c +0 -1
@@ -15,7 +15,6 @@#include <asm/proto.h> #include <asm/vdso.h> #include <asm/page.h> -#include "vdso_image.h" #if defined(CONFIG_X86_64 )unsigned int __read_mostly vdso_enabled =1 ;
PATCH 2/2 x86: Finish removing VDSO32_PRELINK
In reply to Andy LutomirskiIt's a declaration of a nonexistent symbol. We can get rid of the 64-bit versions, too, but that's more intrusive.
--- arch/x86/include/asm/vdso.h | 2 -- 1 file changed, 2 deletions(-)
arch/x86/include/asm/vdso.h +0 -2
@@ -41,8 +41,6 @@ DECLARE_VDSO_IMAGE(vdso32_syscall);#endif DECLARE_VDSO_IMAGE (vdso32_sysenter); -extern const char VDSO32_PRELINK []; -/* * Given a pointer to the vDSO image, find the pointer to VDSO32_name * as that symbol is defined in the vDSO sources or linker script.
Signature · 1 line
1.8.5.3
tip-bot for Andy Lutomirski
merge bot[tip:x86/vdso] x86, vdso: Finish removing VDSO32_PRELINK
x86, vdso: Finish removing VDSO32_PRELINK
Commit-ID: 3c1b63b9e4862fb16352a0646439c2dd6d9e0e5c Gitweb: http://git.kernel.org/tip/3c1b63b9e4862fb16352a0646439c2dd6d9e0e5c Author: Andy Lutomirski <[email protected]> AuthorDate: Thu, 20 Mar 2014 18:57:19 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Thu, 20 Mar 2014 20:20:18 -0700
x86, vdso: Finish removing VDSO32_PRELINK
It's a declaration of a nonexistent symbol. We can get rid of the 64-bit versions, too, but that's more intrusive.
--- arch/x86/include/asm/vdso.h | 2 -- 1 file changed, 2 deletions(-)
arch/x86/include/asm/vdso.h +0 -2
@@ -41,8 +41,6 @@ DECLARE_VDSO_IMAGE(vdso32_syscall);#endif DECLARE_VDSO_IMAGE (vdso32_sysenter); -extern const char VDSO32_PRELINK []; -/* * Given a pointer to the vDSO image, find the pointer to VDSO32_name * as that symbol is defined in the vDSO sources or linker script.