Re: [PATCH v3] selftests/mm: remove the local PKEY_UNRESTRICTED fallback

From: SJ Park

Date: Tue Aug 25 2026 - 20:23:26 EST


On Tue, 25 Aug 2026 21:47:15 +0530 Hemanth Selam <hemanth.selam@xxxxxxxxx> wrote:

> pkey-helpers.h defines PKEY_UNRESTRICTED itself when the macro is not
> already known, a stopgap from when the generic definition was still
> under review. It has been merged since, commit 6d61527d931b ("mm/pkey:
> Add PKEY_UNRESTRICTED macro"), so the guard is never taken and the FIXME
> can be honoured.
>
> The definition comes from tools/include/uapi/asm-generic/mman-common.h
> via TOOLS_INCLUDES, which commit e076eaca5906 ("selftests: break the
> dependency upon local header files") added so that the mm selftests
> build without "make headers". It is reached through the
> <asm-generic/mman.h> that the system <asm/mman.h> includes. Building
> the pkey tests with KHDR_INCLUDES pointing at an empty directory
> confirms that; emptying TOOLS_INCLUDES as well is what makes the macro
> go missing.
>
> No functional change intended.

Makes sense to me.

>
> Assisted-by: Cursor:claude-opus-5
> Signed-off-by: Hemanth Selam <hemanth.selam@xxxxxxxxx>
> Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> Acked-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>

Reviewed-by: SJ Park <sj@xxxxxxxxxx>


Thanks,
SJ

[...]