aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-11 20:10:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-11 20:10:05 -0400
commit47ea8dd8710ba32391b729c95bea005b6fd86243 (patch)
tree387e2f5868d4d53156784e90291dfaa1931eaccd /arch/x86
parentbae78dc25993f62194ee53da67b14e3d5007c6c4 (diff)
parentd093601be5e97d2729614419d0d256ed3b6a56b0 (diff)
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Peter Anvin: "A couple of further build fixes for the VDSO code. This is turning into a bit of a headache, and Andy has already come up with a more ultimate cleanup, but most likely that is 3.17 material" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86-32, vdso: Fix vDSO build error due to missing align_vdso_addr() x86-64, vdso: Fix vDSO build breakage due to empty .rela.dyn
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/vdso/vdso2c.h3
-rw-r--r--arch/x86/vdso/vma.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
index df95a2fdff73..11b65d4f9414 100644
--- a/arch/x86/vdso/vdso2c.h
+++ b/arch/x86/vdso/vdso2c.h
@@ -93,6 +93,9 @@ static void BITSFUNC(copy_section)(struct BITSFUNC(fake_sections) *out,
93 uint64_t flags = GET_LE(&in->sh_flags); 93 uint64_t flags = GET_LE(&in->sh_flags);
94 94
95 bool copy = flags & SHF_ALLOC && 95 bool copy = flags & SHF_ALLOC &&
96 (GET_LE(&in->sh_size) ||
97 (GET_LE(&in->sh_type) != SHT_RELA &&
98 GET_LE(&in->sh_type) != SHT_REL)) &&
96 strcmp(name, ".altinstructions") && 99 strcmp(name, ".altinstructions") &&
97 strcmp(name, ".altinstr_replacement"); 100 strcmp(name, ".altinstr_replacement");
98 101
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index e1513c47872a..5a5176de8d0a 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -62,6 +62,9 @@ struct linux_binprm;
62 Only used for the 64-bit and x32 vdsos. */ 62 Only used for the 64-bit and x32 vdsos. */
63static unsigned long vdso_addr(unsigned long start, unsigned len) 63static unsigned long vdso_addr(unsigned long start, unsigned len)
64{ 64{
65#ifdef CONFIG_X86_32
66 return 0;
67#else
65 unsigned long addr, end; 68 unsigned long addr, end;
66 unsigned offset; 69 unsigned offset;
67 end = (start + PMD_SIZE - 1) & PMD_MASK; 70 end = (start + PMD_SIZE - 1) & PMD_MASK;
@@ -83,6 +86,7 @@ static unsigned long vdso_addr(unsigned long start, unsigned len)
83 addr = align_vdso_addr(addr); 86 addr = align_vdso_addr(addr);
84 87
85 return addr; 88 return addr;
89#endif
86} 90}
87 91
88static int map_vdso(const struct vdso_image *image, bool calculate_addr) 92static int map_vdso(const struct vdso_image *image, bool calculate_addr)