From patchwork Fri Jan 17 09:23:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 3503081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 454FE9F2E9 for ; Fri, 17 Jan 2014 09:26:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 755862015E for ; Fri, 17 Jan 2014 09:26:42 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97B7A20142 for ; Fri, 17 Jan 2014 09:26:41 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W45fR-0001DA-2U; Fri, 17 Jan 2014 09:24:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W45ep-0003g4-RB; Fri, 17 Jan 2014 09:24:07 +0000 Received: from mail-wg0-f51.google.com ([74.125.82.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W45eQ-0003aV-7K for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 09:23:43 +0000 Received: by mail-wg0-f51.google.com with SMTP id z12so4286311wgg.30 for ; Fri, 17 Jan 2014 01:23:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bIiaMWlU3iESpY3N58ZN7aaqGlDosfa1on1A24vFV64=; b=bfPXapAgmYUK1qgaqIfjwaLSlhGq8KJ2yz46qrZ0G90/a+XG8e4ARl4076wHswvja3 tFp8aOOe8OrF2R+1lkjY2/GMleKP//pWZdM8o/5zuhejqJR/qOTd93y7zkMlPaAUUPWb zFUokDuRHAFtu1eWCjv0P/Zu85l+Vnat03UaRgYOhyQwUFD/+C9p06Go/15utuXZwmYQ r+M5J1yS3a1f8WKHnw4uiHU7pCItDDwrREWwYuhuhzukMG+fyRmiLQZI4SP+Y6qOQ4a2 8JBFe601gDpEA5kFP5drpgeqL5TrOAOoFob2/RBM5HKziUHuEoYsOMggHRMIEnPqomAi 2gvQ== X-Gm-Message-State: ALoCoQkQAagwCWfClZrbcj3FsFJrnCatrbWgtbj2OwS6j+pWjNOu1hbTEO8hyikzF4OM4iamNAVO X-Received: by 10.180.90.37 with SMTP id bt5mr1462848wib.43.1389950599511; Fri, 17 Jan 2014 01:23:19 -0800 (PST) Received: from ards-mac-mini.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id 5sm8736569wjw.17.2014.01.17.01.23.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:23:19 -0800 (PST) From: Ard Biesheuvel To: linux@arm.linux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, viro@zeniv.linux.org.uk, dave.martin@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 resend 2/5] binfmt_elf: add ELF_HWCAP2 to compat auxv entries Date: Fri, 17 Jan 2014 10:23:08 +0100 Message-Id: <1389950591-4212-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389950591-4212-1-git-send-email-ard.biesheuvel@linaro.org> References: <1389950591-4212-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140117_042342_366972_600B55B2 X-CRM114-Status: UNSURE ( 8.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: peter.maydell@linaro.org, Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add ELF_HWCAP2 to the set of auxv entries that is passed to a 32-bit ELF program running in 32-bit compat mode under a 64-bit kernel. Signed-off-by: Ard Biesheuvel --- fs/compat_binfmt_elf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c index a81147e2e4ef..4d24d17bcfc1 100644 --- a/fs/compat_binfmt_elf.c +++ b/fs/compat_binfmt_elf.c @@ -88,6 +88,11 @@ static void cputime_to_compat_timeval(const cputime_t cputime, #define ELF_HWCAP COMPAT_ELF_HWCAP #endif +#ifdef COMPAT_ELF_HWCAP2 +#undef ELF_HWCAP2 +#define ELF_HWCAP2 COMPAT_ELF_HWCAP2 +#endif + #ifdef COMPAT_ARCH_DLINFO #undef ARCH_DLINFO #define ARCH_DLINFO COMPAT_ARCH_DLINFO