[PATCH v1 3/7] kexec: use GFP_HIGHUSER_KASAN for segment pages
Jeff Xu
jeffxu at chromium.org
Mon Nov 16 15:06:23 PST 2026
kimage_load_normal_segment() allocates the pages that hold the segments
of the next kernel. The kernel clears and fills them through
kmap_local_page(), and they are never mapped into userspace.
Allocate them with GFP_HIGHUSER_KASAN, so that they keep their KASAN
tagging when GFP_HIGHUSER starts to skip it later in this series.
No functional change: GFP_HIGHUSER_KASAN has the same value as
GFP_HIGHUSER at this point. Build tested only.
Assisted-by: LLM
Cc: Baoquan He <baoquan.he at linux.dev>
Cc: Pasha Tatashin <pasha.tatashin at soleen.com>
Cc: Pratyush Yadav <pratyush at kernel.org>
Cc: kexec at lists.infradead.org
Signed-off-by: Jeff Xu <jeffxu at chromium.org>
---
kernel/kexec_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index f4a31565c447..a3abbb6a2d75 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -839,7 +839,7 @@ static int kimage_load_normal_segment(struct kimage *image, int idx)
char *ptr;
size_t uchunk, mchunk;
- page = kimage_alloc_page(image, GFP_HIGHUSER, maddr);
+ page = kimage_alloc_page(image, GFP_HIGHUSER_KASAN, maddr);
if (!page) {
result = -ENOMEM;
goto out;
--
2.56.0.611.g1030f0b940-goog
More information about the kexec
mailing list