[PATCH v1 7/7] mm/kasan/kunit: add page_alloc_highuser_kasan test
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Nov 16 15:15:53 PST 2026
> Add a KUnit test (page_alloc_highuser_kasan) to verify that, unlike
> GFP_HIGHUSER, page allocations using GFP_HIGHUSER_KASAN under
> CONFIG_KASAN_HW_TAGS:
> 1. Get a KASAN tag in page_kasan_tag() across all sub-pages of a
> high-order allocation, and the same tag in the pointer returned by
> page_address(), and
> 2. Are poisoned on free, so that a use-after-free through the stale
> pointer is reported.
>
> The test fails if __GFP_SKIP_KASAN is added to GFP_HIGHUSER_KASAN.
>
> Tested on arm64 with CONFIG_KASAN_HW_TAGS under QEMU (virt,mte=on) with
> kasan.mode=sync, async and asymm.
>
> Assisted-by: LLM
> Signed-off-by: Jeff Xu <jeffxu at chromium.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116230627.3537051-1-jeffxu@chromium.org?part=7
More information about the kexec
mailing list