[PATCH v3] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-14 Thread qiang4 . zhang
From: Qiang Zhang On the time to free xbc memory in xbc_exit(), memblock may has handed over memory to buddy allocator. So it doesn't make sense to free memory back to memblock. memblock_free() called by xbc_exit() even causes UAF bugs on architectures with CONFIG_ARCH_KEEP_MEMBLOCK disabled

[PATCH v2] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-12 Thread qiang4 . zhang
From: Qiang Zhang On the time to free xbc memory in xbc_exit(), memblock may has handed over memory to buddy allocator. So it doesn't make sense to free memory back to memblock. memblock_free() called by xbc_exit() even causes UAF bugs on architectures with CONFIG_ARCH_KEEP_MEMBLOCK disabled

[PATCH RESEND] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-11 Thread qiang4 . zhang
From: Qiang Zhang On the time to free xbc memory, memblock has handed over memory to buddy allocator. So it doesn't make sense to free memory back to memblock. memblock_free() called by xbc_exit() even causes UAF bugs on architectures with CONFIG_ARCH_KEEP_MEMBLOCK disabled like x86. Following

[PATCH] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-11 Thread qiang4 . zhang
From: Qiang Zhang On the time to free xbc memory, memblock has handed over memory to buddy allocator. So it doesn't make sense to free memory back to memblock. memblock_free() called by xbc_exit() even causes UAF bugs on architectures with CONFIG_ARCH_KEEP_MEMBLOCK disabled like x86. Following