From patchwork Mon Dec 23 14:06:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 3396801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA822C0D4A for ; Mon, 23 Dec 2013 14:08:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D18D120787 for ; Mon, 23 Dec 2013 14:08:43 +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 AA1E1201BE for ; Mon, 23 Dec 2013 14:08:42 +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 1Vv6Af-0000Wi-3B; Mon, 23 Dec 2013 14:07:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv6AS-000091-NW; Mon, 23 Dec 2013 14:07:36 +0000 Received: from mail-ea0-f182.google.com ([209.85.215.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv69y-0008Vh-W9 for linux-arm-kernel@lists.infradead.org; Mon, 23 Dec 2013 14:07:08 +0000 Received: by mail-ea0-f182.google.com with SMTP id a15so2369368eae.41 for ; Mon, 23 Dec 2013 06:06:44 -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=8Wk+7ELn7FvfyYrJsLeVBN42j4byt6trotqNjXu5eZE=; b=MkhRWuju1FukBxhq9p8t/YelzTk06MUe9B1f81gCocOCXsssj5Pb6I8rCaoF+YEkT2 cQXbJtHRQwWNbT74aDBiOyzLScxH36GoFz00Kpb5/vFcPpX/AbNCil6guxBSCMJUxQNH glvRfSW/UKu7ZLjEpuWMFwZ60ONDv+1zKJqAfutipkTxTpkXT2h4GlL/IY8TN9pQ3M0z Wi3Xlt6zYWLJZVZLiiFFQdyQhlss1eGjB824Nm9Ab9FfSF4DNqA1QeA9AXeoK81VF2RH jEm5EJYJ98diKR+GFLVgw2dwLN8R3XtIXSKUeF6h/HiDY5xH2NbFXYTGHZfAh+ljBxWn HrBA== X-Gm-Message-State: ALoCoQm5yW9I4kpTKvGqLSf1V+DLR8TGTfBi4c8yx17pCm/3NnE+SW90rE9VrZbZFWUxPkKdzlSE X-Received: by 10.14.0.201 with SMTP id 49mr20836499eeb.38.1387807604023; Mon, 23 Dec 2013 06:06:44 -0800 (PST) Received: from ards-mac-mini.local (ip16-2-212-87.adsl2.static.versatel.nl. [87.212.2.16]) by mx.google.com with ESMTPSA id p45sm45942819eeg.1.2013.12.23.06.06.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Dec 2013 06:06:43 -0800 (PST) From: Ard Biesheuvel To: linux@arm.linux.org.uk, catalin.marinas@arm.com, viro@zeniv.linux.org.uk, nico@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] binfmt_elf: add ELF_HWCAP2 to compat auxv entries Date: Mon, 23 Dec 2013 15:06:29 +0100 Message-Id: <1387807592-26375-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387807592-26375-1-git-send-email-ard.biesheuvel@linaro.org> References: <1387807592-26375-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131223_090707_234272_28937F1A X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: 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.7 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 Acked-by: Catalin Marinas --- 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 a81147e..4d24d17 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