From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752844AbcI3KoV (ORCPT ); Fri, 30 Sep 2016 06:44:21 -0400 Received: from terminus.zytor.com ([198.137.202.10]:43144 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbcI3KoS (ORCPT ); Fri, 30 Sep 2016 06:44:18 -0400 Date: Fri, 30 Sep 2016 03:44:03 -0700 From: tip-bot for Segher Boessenkool Message-ID: 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 Reply-To: paul.gortmaker@windriver.com, linux-kernel@vger.kernel.org, luto@kernel.org, tglx@linutronix.de, segher@kernel.crashing.org, sfr@canb.auug.org.au, hpa@zytor.com, mingo@kernel.org In-Reply-To: <20160929193442.GA16617@gate.crashing.org> References: <20160929193442.GA16617@gate.crashing.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/vdso: Fix building on big endian host Git-Commit-ID: e4aad64597d7a2455a541f904365b48d607916db X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e4aad64597d7a2455a541f904365b48d607916db Gitweb: http://git.kernel.org/tip/e4aad64597d7a2455a541f904365b48d607916db Author: Segher Boessenkool AuthorDate: Thu, 29 Sep 2016 11:51:00 +0000 Committer: Thomas Gleixner 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 Signed-off-by: Segher Boessenkool Acked-by: Andy Lutomirski Cc: Stephen Rothwell Cc: linux-next@vger.kernel.org Link: http://lkml.kernel.org/r/20160929193442.GA16617@gate.crashing.org Signed-off-by: Thomas Gleixner --- 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. */