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: 23308 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E9E720540 for ; Fri, 17 Jan 2014 09:23:40 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id vb8sf13002844obc.2 for ; Fri, 17 Jan 2014 01:23:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=gyETlL7ySjQfdRMdqVRS2CErJ9NuW6nqumnstj78XU4=; b=GnAzA9GKdvWjLPdljGJxPyXpXsPfkima9J5tZtzFgFIMqGq2Ezn6CkjMXuHVpfQe+S C3yrNfpeVXBJzhQy/glGMC0MUnYQMKdqCwmHdLXjRyjc86MmLjfpD0ai6vLW2QBYHJMy fq1Jlr8PITlrLFAWJ16xgI3529IMzzwUpgfjNgSkRdxUEbKBCeqImzxxuzs5yOCuqoUN wW4kp9s0O0VHuE4U3E1cG0xugH9BQaddHYAfZrQ+3BkuIFgk1i+zFAnacUcoept3c9Ku sSTojPzqD/Yf0r2cSTDohNkOx7z6mKtZbiaQpr9FU4PzVzG/RI6B3SREVy3SPxmcZ9rP KidQ== X-Gm-Message-State: ALoCoQnKwQ1gXlMpkciR7WkLI/WduEqGwJI8mFbWC6Zq4SD8ZBaIQlToJOc7pm6IQHQI8hT0eQQ1 X-Received: by 10.42.123.139 with SMTP id s11mr251079icr.15.1389950619326; Fri, 17 Jan 2014 01:23:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.122.101 with SMTP id lr5ls1048599qeb.82.gmail; Fri, 17 Jan 2014 01:23:39 -0800 (PST) X-Received: by 10.220.1.131 with SMTP id 3mr411031vcf.4.1389950619194; Fri, 17 Jan 2014 01:23:39 -0800 (PST) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id vc3si4629086vdc.18.2014.01.17.01.23.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 01:23:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id i3so1036974vbh.1 for ; Fri, 17 Jan 2014 01:23:39 -0800 (PST) X-Received: by 10.221.51.5 with SMTP id vg5mr400634vcb.40.1389950619095; Fri, 17 Jan 2014 01:23:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp5852ved; Fri, 17 Jan 2014 01:23:38 -0800 (PST) X-Received: by 10.66.242.17 with SMTP id wm17mr988511pac.102.1389950618067; Fri, 17 Jan 2014 01:23:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gm1si9611487pac.100.2014.01.17.01.23.37; Fri, 17 Jan 2014 01:23:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752468AbaAQJX1 (ORCPT + 26 others); Fri, 17 Jan 2014 04:23:27 -0500 Received: from mail-we0-f178.google.com ([74.125.82.178]:45087 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbaAQJXU (ORCPT ); Fri, 17 Jan 2014 04:23:20 -0500 Received: by mail-we0-f178.google.com with SMTP id t60so4228877wes.37 for ; Fri, 17 Jan 2014 01:23:19 -0800 (PST) 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 Cc: peter.maydell@linaro.org, Ard Biesheuvel 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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