Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'memblock-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock update from Mike Rapoport:
"Introduce a 'check_pages' boot parameter to decouple simple checks for
page state on allocation and free from CONFIG_DEBUG_VM.

This allows enabling page checking without building kernel with
CONFIG_DEBUG_VM or forcing init_on_{alloc, free} or other heavier
mechanisms"

* tag 'memblock-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
mm/mm_init: Introduce a boot parameter for check_pages

+17 -1
+8
Documentation/admin-guide/kernel-parameters.txt
··· 767 767 nokmem -- Disable kernel memory accounting. 768 768 nobpf -- Disable BPF memory accounting. 769 769 770 + check_pages= [MM,EARLY] Enable sanity checking of pages after 771 + allocations / before freeing. This adds checks to catch 772 + double-frees, use-after-frees, and other sources of 773 + page corruption by inspecting page internals (flags, 774 + mapcount/refcount, memcg_data, etc.). 775 + Format: { "0" | "1" } 776 + Default: 0 (1 if CONFIG_DEBUG_VM is set) 777 + 770 778 checkreqprot= [SELINUX] Set initial checkreqprot flag value. 771 779 Format: { "0" | "1" } 772 780 See security/selinux/Kconfig help text.
+9 -1
mm/mm_init.c
··· 2525 2525 2526 2526 DEFINE_STATIC_KEY_MAYBE(CONFIG_DEBUG_VM, check_pages_enabled); 2527 2527 2528 + static bool check_pages_enabled_early __initdata; 2529 + 2530 + static int __init early_check_pages(char *buf) 2531 + { 2532 + return kstrtobool(buf, &check_pages_enabled_early); 2533 + } 2534 + early_param("check_pages", early_check_pages); 2535 + 2528 2536 /* 2529 2537 * Enable static keys related to various memory debugging and hardening options. 2530 2538 * Some override others, and depend on early params that are evaluated in the ··· 2542 2534 static void __init mem_debugging_and_hardening_init(void) 2543 2535 { 2544 2536 bool page_poisoning_requested = false; 2545 - bool want_check_pages = false; 2537 + bool want_check_pages = check_pages_enabled_early; 2546 2538 2547 2539 #ifdef CONFIG_PAGE_POISONING 2548 2540 /*