* [PATCH v1 0/2] Fix KASAN support for KHO restored vmalloc regions
@ 2026-02-25 22:02 Pasha Tatashin
0 siblings, 0 replies; 2+ messages in thread
From: Pasha Tatashin @ 2026-02-25 22:02 UTC (permalink / raw)
To: pratyush, akpm, david, lorenzo.stoakes, Liam.Howlett, vbabka,
rppt, graf, pasha.tatashin, linux-mm, linux-kernel, surenb,
mhocko, urezki
When KHO restores a vmalloc area, it maps existing physical pages into a
newly allocated virtual memory area. However, because these areas were not
properly unpoisoned, KASAN would treat any access to the restored region
as out-of-bounds, as seen in the following trace:
BUG: KASAN: vmalloc-out-of-bounds in kho_test_restore_data.isra.0+0x17b/0x2cd
Read of size 8 at addr ffffc90000025000 by task swapper/0/1
[...]
Call Trace:
[...]
kasan_report+0xe8/0x120
kho_test_restore_data.isra.0+0x17b/0x2cd
kho_test_init+0x15a/0x1f0
do_one_initcall+0xd5/0x4b0
The fix involves deferring KASAN's default poisoning by using the
VM_UNINITIALIZED flag during allocation, manually unpoisoning the
memory once it is correctly mapped, and then clearing the uninitialized
flag using a newly exported helper.
Pasha Tatashin (2):
mm/vmalloc: export clear_vm_uninitialized_flag()
kho: fix KASAN support for restored vmalloc regions
kernel/liveupdate/kexec_handover.c | 12 +++++++++++-
mm/internal.h | 2 ++
mm/vmalloc.c | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
--
2.53.0.414.gf7e9f6c205-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v1 0/2] Fix KASAN support for KHO restored vmalloc regions
@ 2026-02-25 22:38 Pasha Tatashin
0 siblings, 0 replies; 2+ messages in thread
From: Pasha Tatashin @ 2026-02-25 22:38 UTC (permalink / raw)
To: pratyush, akpm, david, lorenzo.stoakes, Liam.Howlett, vbabka,
rppt, graf, pasha.tatashin, linux-mm, linux-kernel, surenb,
mhocko, urezki
When KHO restores a vmalloc area, it maps existing physical pages into a
newly allocated virtual memory area. However, because these areas were not
properly unpoisoned, KASAN would treat any access to the restored region
as out-of-bounds, as seen in the following trace:
BUG: KASAN: vmalloc-out-of-bounds in kho_test_restore_data.isra.0+0x17b/0x2cd
Read of size 8 at addr ffffc90000025000 by task swapper/0/1
[...]
Call Trace:
[...]
kasan_report+0xe8/0x120
kho_test_restore_data.isra.0+0x17b/0x2cd
kho_test_init+0x15a/0x1f0
do_one_initcall+0xd5/0x4b0
The fix involves deferring KASAN's default poisoning by using the
VM_UNINITIALIZED flag during allocation, manually unpoisoning the
memory once it is correctly mapped, and then clearing the uninitialized
flag using a newly exported helper.
Pasha Tatashin (2):
mm/vmalloc: export clear_vm_uninitialized_flag()
kho: fix KASAN support for restored vmalloc regions
kernel/liveupdate/kexec_handover.c | 12 +++++++++++-
mm/internal.h | 2 ++
mm/vmalloc.c | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
--
2.53.0.414.gf7e9f6c205-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-25 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 22:02 [PATCH v1 0/2] Fix KASAN support for KHO restored vmalloc regions Pasha Tatashin
2026-02-25 22:38 Pasha Tatashin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox