From: "Michal Koutný" <mkoutny@suse.com>
To: Andrei Vagin <avagin@google.com>
Cc: Kees Cook <kees@kernel.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, criu@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Chen Ridong <chenridong@huawei.com>,
Christian Brauner <brauner@kernel.org>,
David Hildenbrand <david@kernel.org>,
Eric Biederman <ebiederm@xmission.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Mark Brown <broonie@kernel.org>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [PATCH 1/3] binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4
Date: Mon, 12 Jan 2026 13:38:28 +0100 [thread overview]
Message-ID: <zt6p77wtnc2rrw3hko3ppl2sruy64fhrz2mhgyahvpjuzitpga@tpjsfhxmwrep> (raw)
In-Reply-To: <20260108050748.520792-2-avagin@google.com>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Thu, Jan 08, 2026 at 05:07:46AM +0000, Andrei Vagin <avagin@google.com> wrote:
> Commit 4e6e8c2b757f ("binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4") added
> support for AT_HWCAP3 and AT_HWCAP4, but it missed updating the AUX
> vector size calculation in create_elf_fdpic_tables() and
> AT_VECTOR_SIZE_BASE in include/linux/auxvec.h.
>
> Similar to the fix for ELF_HWCAP2 in commit c6a09e342f8e
> ("binfmt_elf_fdpic: fix AUXV size calculation when ELF_HWCAP2 is defined"),
> this omission leads to a mismatch between the reserved space and the
> actual number of AUX entries, eventually triggering a kernel BUG_ON(csp != sp).
>
> Fix this by incrementing nitems when ELF_HWCAP3 or ELF_HWCAP4 are defined
> and updating AT_VECTOR_SIZE_BASE.
>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Max Filippov <jcmvbkbc@gmail.com>
> Fixes: 4e6e8c2b757f ("binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4")
> Signed-off-by: Andrei Vagin <avagin@google.com>
> ---
> fs/binfmt_elf_fdpic.c | 6 ++++++
> include/linux/auxvec.h | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
Good catch.
Reviewed-by: Michal Koutný <mkoutny@suse.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-01-12 12:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 5:07 [PATCH 0/3 v2] exec: inherit HWCAPs from the parent process Andrei Vagin
2026-01-08 5:07 ` [PATCH 1/3] binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4 Andrei Vagin
2026-01-08 11:31 ` Mark Brown
2026-01-12 12:38 ` Michal Koutný [this message]
2026-01-08 5:07 ` [PATCH 2/3] exec: inherit HWCAPs from the parent process Andrei Vagin
2026-01-12 12:46 ` Michal Koutný
2026-01-12 21:56 ` Andrei Vagin
2026-01-12 22:18 ` Andrei Vagin
2026-01-14 21:25 ` Michal Koutný
2026-01-21 5:24 ` Andrei Vagin
2026-01-08 5:07 ` [PATCH 3/3] selftests/exec: add test for HWCAP inheritance Andrei Vagin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=zt6p77wtnc2rrw3hko3ppl2sruy64fhrz2mhgyahvpjuzitpga@tpjsfhxmwrep \
--to=mkoutny@suse.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=brauner@kernel.org \
--cc=broonie@kernel.org \
--cc=chenridong@huawei.com \
--cc=criu@lists.linux.dev \
--cc=david@kernel.org \
--cc=ebiederm@xmission.com \
--cc=jcmvbkbc@gmail.com \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox