Skip to content

Commit

Permalink
x86/vdso: Fix building on big endian host
Browse files Browse the repository at this point in the history
We need to call GET_LE to read hdr->e_type.

Fixes: 57f90c3 ("x86/vdso: Error out if the vDSO isn't a valid DSO")
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org
Link: http://lkml.kernel.org/r/20160929193442.GA16617@gate.crashing.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Segher Boessenkool authored and Thomas Gleixner committed Sep 30, 2016
1 parent 192d1dc commit e4aad64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/entry/vdso/vdso2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,

ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));

if (hdr->e_type != ET_DYN)
if (GET_LE(&hdr->e_type) != ET_DYN)
fail("input is not a shared object\n");

/* Walk the segment table. */
Expand Down

0 comments on commit e4aad64

Please sign in to comment.