memblock: improve late freeing of reserved memory
Status from this message: Applied to for-next branch of memblock.git tree, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 5 repliesApplied
- v18 patches 2 repliesSuperseded
Changes in v2 from the cover letter
* fix UAF issue in memblock_discard() reported by 0day and sashiko
* address relevant sashiko comments
* squash memblock test stubs changes into the commit with core updates
Patches in v2 Applied
Reviews trailers per patch
1 of 9 patches has a Reviewed-by or Acked-by.
| Patch | Bert Karwatzki | Vlastimil Babka (SUSE) |
|---|---|---|
| 1/9 | ||
| 2/9 | ||
| 3/9 | ||
| 4/9 | A-b | |
| 5/9 | ||
| 6/9 | ||
| 7/9 | ||
| 8/9 | ||
| 9/9 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/9] memblock: improve late freeing of reserved memory
From: "Mike Rapoport (Microsoft)" <[email protected]>
Hi,
Following a recent discussion about leaks in x86 EFI [1], I audited usage of memblock_free_late() and free_reserved_area() and made some imporovements how we handle late freeing of the memory allocated with memblock.
[1] https://lore.kernel.org/all/ec2aaef14783869b3be6e3c253b2dcbf67dbc12a.camel@kernel.crashing.org/
v2 changes:
* fix UAF issue in memblock_discard() reported by 0day and sashiko
* address relevant sashiko comments
* squash memblock test stubs changes into the commit with core updates
v1: https://lore.kernel.org/all/[email protected]
Mike Rapoport (Microsoft) (9):
memblock: reserve_mem: fix end caclulation in reserve_mem_release_by_name()
powerpc: fadump: pair alloc_pages_exact() with free_pages_exact()
powerpc: opal-core: pair alloc_pages_exact() with free_pages_exact()
mm: move free_reserved_area() to mm/memblock.c
memblock: make free_reserved_area() more robust
memblock: extract page freeing from free_reserved_area() into a helper
memblock: make free_reserved_area() update memblock if ARCH_KEEP_MEMBLOCK=y memblock, treewide: make memblock_free() handle late freeing
memblock: warn when freeing reserved memory before memory map is initialized
arch/arm64/mm/init.c | 3 - arch/powerpc/kernel/fadump.c | 16 +-- arch/powerpc/platforms/powernv/opal-core.c | 11 +- arch/sparc/kernel/mdesc.c | 4 +- arch/x86/kernel/setup.c | 2 +- arch/x86/platform/efi/memmap.c | 5 +- arch/x86/platform/efi/quirks.c | 2 +- drivers/firmware/efi/apple-properties.c | 2 +- drivers/of/kexec.c | 2 +- include/linux/memblock.h | 2 - init/initramfs.c | 7 -- kernel/dma/swiotlb.c | 6 +- lib/bootconfig.c | 2 +- mm/internal.h | 10 ++ mm/kfence/core.c | 4 +- mm/memblock.c | 124 +++++++++++++++------ mm/page_alloc.c | 46 -------- tools/include/linux/mm.h | 1 + tools/testing/memblock/internal.h | 34 +++++- 19 files changed, 144 insertions(+), 139 deletions(-)
base-commit: 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
Signature · 1 line
2.53.0