v1
2026-09-04
mm/execmem: fixes and cleanups for the ROX cache · v1
execmem ROX cache:修复整块误释放、处理 maple tree 分配失败、保证缓存为 PMD_SIZE 倍数并改 scope cleanup。
原始补丁链接
子 Patch(5)
1/5
mm/execmem: free ROX cache chunks only when they span an entire vm area
[mm/execmem: free ROX cache chunks only when they span an entire vm area] When execmem refills the ROX cache, it vmalloc()s multiples of PMD_SIZE aligned to PMD_SIZE. For every such allocation vmalloc
2/5
mm/execmem: handle potential allocation errors in the maple tree
[mm/execmem: handle potential allocation errors in the maple tree] execmem_cache_clean() and execmem_cache_alloc_locked() ignore potential allocation failures in mas_store_gfp(). While in practice th
3/5
mm/execmem: make sure ROX cache always contains multiples of PMD_SIZE
[mm/execmem: make sure ROX cache always contains multiples of PMD_SIZE] The ROX cache relies on its chunks being PMD mapped. For a PMD mapped chunk, set_memory_rox() updates the direct map alias one P
4/5
mm/vmalloc: add DEFINE_FREE() for vfree()
[mm/vmalloc: add DEFINE_FREE() for vfree()] … and use it in hid-core, the only place with a cleanup for a vmalloc() allocation. Signed-off-by: Mike Rapoport (Microsoft) rppt@kernel.org — drive
5/5
mm/execmem: use cleanup infrastructure in ROX cache functions
[mm/execmem: use cleanup infrastructure in ROX cache functions] After splitting out execmem_alloc_rox() from execmem_cache_populate_alloc(), the error paths of both functions became less complex and c