From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2C25EED61E for ; Thu, 12 Sep 2024 16:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zhEFSa683jqIhfYPJZtLM72bn0Gdi7yo7uQSp8ueRH8=; b=JcVdEZTq8B/2VRfmNvKbLmpJ5H RsS0YUZ1YLOd+ofu+gSFb93Xq+rqF5NMb+sNugIgTr64TVz+h/GAB6l0B9cRZGz1k5aTJF4QtvOwh poEt6UKBVX90OVSA6a0PXSLlV2dZrt/2SekqEcQBZu4fPbllbGpGkTgMpaeIXROOu8h3PFY7mO2iB YQhK5i+NxahRZxx85hcU/HvOa0vpqpQ7BW1/lpf55assKso9qXOyISLvwor0L0gHOAch0Zqt86zTz ZzmRY02WSQq2PHjMkA4NmF6h4gFPmG+ThEZ6dZoknidEqOo3GiKTypEyjYcxsgWSb384k7XLHxExq BijSRg5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1somh8-0000000Dhcl-1Fi2; Thu, 12 Sep 2024 16:29:22 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1somg3-0000000DhKT-3wo6 for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 16:28:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 64FC15C47C4; Thu, 12 Sep 2024 16:28:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10AAEC4CEC4; Thu, 12 Sep 2024 16:28:11 +0000 (UTC) Date: Thu, 12 Sep 2024 17:28:09 +0100 From: Catalin Marinas To: Mark Brown Cc: Alexander Viro , Christian Brauner , Jan Kara , Eric Biederman , Kees Cook , Will Deacon , Jonathan Corbet , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yury Khrustalev , Wilco Dijkstra , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org Subject: Re: [PATCH RFC 1/2] binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4 Message-ID: References: <20240906-arm64-elf-hwcap3-v1-0-8df1a5e63508@kernel.org> <20240906-arm64-elf-hwcap3-v1-1-8df1a5e63508@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240906-arm64-elf-hwcap3-v1-1-8df1a5e63508@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240912_092816_068797_C6F29FCA X-CRM114-Status: GOOD ( 13.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 06, 2024 at 12:05:24AM +0100, Mark Brown wrote: > diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c > index 19fa49cd9907..32e45e65de8f 100644 > --- a/fs/binfmt_elf.c > +++ b/fs/binfmt_elf.c > @@ -257,6 +257,12 @@ create_elf_tables(struct linux_binprm *bprm, const struct elfhdr *exec, > NEW_AUX_ENT(AT_RANDOM, (elf_addr_t)(unsigned long)u_rand_bytes); > #ifdef ELF_HWCAP2 > NEW_AUX_ENT(AT_HWCAP2, ELF_HWCAP2); > +#endif > +#ifdef ELF_HWCAP3 > + NEW_AUX_ENT(AT_HWCAP3, ELF_HWCAP3); > +#endif > +#ifdef ELF_HWCAP4 > + NEW_AUX_ENT(AT_HWCAP3, ELF_HWCAP4); s/HWCAP3/HWCAP4/ for the last line. > #endif > NEW_AUX_ENT(AT_EXECFN, bprm->exec); > if (k_platform) { > diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c > index 28a3439f163a..9365f48598a1 100644 > --- a/fs/binfmt_elf_fdpic.c > +++ b/fs/binfmt_elf_fdpic.c > @@ -620,6 +620,12 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm, > NEW_AUX_ENT(AT_HWCAP, ELF_HWCAP); > #ifdef ELF_HWCAP2 > NEW_AUX_ENT(AT_HWCAP2, ELF_HWCAP2); > +#endif > +#ifdef ELF_HWCAP3 > + NEW_AUX_ENT(AT_HWCAP3, ELF_HWCAP3); > +#endif > +#ifdef ELF_HWCAP3 > + NEW_AUX_ENT(AT_HWCAP4, ELF_HWCAP4); Same here with the ifdef. > #endif > NEW_AUX_ENT(AT_PAGESZ, PAGE_SIZE); > NEW_AUX_ENT(AT_CLKTCK, CLOCKS_PER_SEC); > diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c > index 8f0af4f62631..0a219e26692a 100644 > --- a/fs/compat_binfmt_elf.c > +++ b/fs/compat_binfmt_elf.c > @@ -80,6 +80,21 @@ > #define ELF_HWCAP2 COMPAT_ELF_HWCAP2 > #endif > > +#ifdef COMPAT_ELF_HWCAP3 > +#undef ELF_HWCAP3 > +#define ELF_HWCAP3 COMPAT_ELF_HWCAP3 > +#endif > + > +#ifdef COMPAT_ELF_HWCAP3 > +#undef ELF_HWCAP3 > +#define ELF_HWCAP3 COMPAT_ELF_HWCAP3 > +#endif Duplicate hunk. -- Catalin