public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Segher Boessenkool <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: luto@kernel.org, paul.gortmaker@windriver.com,
	linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com,
	sfr@canb.auug.org.au, tglx@linutronix.de,
	segher@kernel.crashing.org
Subject: [tip:x86/urgent] x86/vdso: Fix building on big endian host
Date: Fri, 30 Sep 2016 03:44:03 -0700	[thread overview]
Message-ID: <tip-e4aad64597d7a2455a541f904365b48d607916db@git.kernel.org> (raw)
In-Reply-To: <20160929193442.GA16617@gate.crashing.org>

Commit-ID:  e4aad64597d7a2455a541f904365b48d607916db
Gitweb:     http://git.kernel.org/tip/e4aad64597d7a2455a541f904365b48d607916db
Author:     Segher Boessenkool <segher@kernel.crashing.org>
AuthorDate: Thu, 29 Sep 2016 11:51:00 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 30 Sep 2016 12:37:40 +0200

x86/vdso: Fix building on big endian host

We need to call GET_LE to read hdr->e_type.

Fixes: 57f90c3dfc75 ("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>

---
 arch/x86/entry/vdso/vdso2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index 4f74119..3dab75f 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/entry/vdso/vdso2c.h
@@ -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. */

      parent reply	other threads:[~2016-09-30 10:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  6:56 linux-next: Tree for Jul 21 Stephen Rothwell
2016-07-21 16:21 ` linux-next: Tree for Jul 21 (gpu/virtio) Randy Dunlap
2016-07-21 23:52 ` linux-next: Tree for Jul 21 Paul Gortmaker
2016-09-29 19:34   ` Segher Boessenkool
2016-09-29 23:14     ` Stephen Rothwell
2016-09-29 23:22       ` Andy Lutomirski
2016-09-30 10:44     ` tip-bot for Segher Boessenkool [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-e4aad64597d7a2455a541f904365b48d607916db@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=segher@kernel.crashing.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox