Re: [PATCH 4/4] selftests/exec: add test for HWCAP inheritance

Kees Cook <[email protected]> Thu, 12 Feb 2026 15:57:27 -0800
Newsgroups dev.linux.lists.criu,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <202602121557.5C1249F@keescook>
On Mon, Feb 09, 2026 at 07:06:05PM +0000, Andrei Vagin wrote:
> Verify that HWCAPs are correctly inherited/preserved across execve() when
> modified via prctl(PR_SET_MM_AUXV).
> 
> The test performs the following steps:
> * reads the current AUXV using prctl(PR_GET_AUXV);
> * finds an HWCAP entry and toggles its most significant bit;
> * replaces the AUXV of the current process with the modified one using
>   prctl(PR_SET_MM, PR_SET_MM_AUXV);
> * executes itself to verify that the new program sees the modified HWCAP
>   value.
> 
> Signed-off-by: Andrei Vagin <[email protected]>

Reviewed-by: Kees Cook <[email protected]>

-- 
Kees Cook