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

2024-04-11 Thread Qiang Zhang
On Fri, Apr 12, 2024 at 10:03:26AM +0800, qiang4.zh...@linux.intel.com wrote: >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 b

[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 KA