Re: [PATCH 1/3] binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4
Michal Koutný <[email protected]> Mon, 12 Jan 2026 13:38:28 +0100
| Newsgroups | dev.linux.lists.criu,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <zt6p77wtnc2rrw3hko3ppl2sruy64fhrz2mhgyahvpjuzitpga@tpjsfhxmwrep> |
On Thu, Jan 08, 2026 at 05:07:46AM +0000, Andrei Vagin <[email protected]> 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 <[email protected]> > Cc: Max Filippov <[email protected]> > Fixes: 4e6e8c2b757f ("binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4") > Signed-off-by: Andrei Vagin <[email protected]> > --- > fs/binfmt_elf_fdpic.c | 6 ++++++ > include/linux/auxvec.h | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) Good catch. Reviewed-by: Michal Koutný <[email protected]>
signature.asc
(application/pgp-signature, 265 B)
-----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCaWTrPhsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMSwyLDIACgkQfj0C55Tb+AgZTQD/fZEPNQXq4wayVRf5UJeP yCKrUVfm0ZVJbogI5yyUiKsBAPYaPoop6oDIbDmy08Fmb8Y8MICFtI5C8agrNBfO CYYM =f8Iv -----END PGP SIGNATURE-----