summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/compiler.h
diff options
context:
space:
mode:
authorJoshua Hahn <joshua.hahnjy@gmail.com>2025-12-01 10:07:38 -0800
committerMike Rapoport (Microsoft) <rppt@kernel.org>2025-12-04 19:40:25 +0200
commit83c8f7b5e194eaf3fb268c513e23e23e892de8ed (patch)
tree3eb3aa6a59d0e0559ac986d4f6d8f46a87a724ac /tools/include/nolibc/compiler.h
parentac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d (diff)
mm/mm_init: Introduce a boot parameter for check_pages
Use-after-free and double-free bugs can be very difficult to track down. The kernel is good at tracking these and preventing bad pages from being used/created through simple checks gated behind "check_pages_enabled". Currently, the only ways to enable this flag is by building with CONFIG_DEBUG_VM, or as a side effect of other checks such as init_on_{alloc, free}, page_poisoning, or debug_pagealloc among others. These solutions are powerful, but may often be too coarse in balancing the performance vs. safety that a user may want, particularly in latency-sensitive production environments. Introduce a new boot parameter "check_pages", which enables page checking with no other side effects. It takes kstrbool-able inputs as an argument (i.e. 0/1, true/false, on/off, ...). This patch is backwards-compatible; setting CONFIG_DEBUG_VM still enables page checking. Acked-by: SeongJae Park <sj@kernel.org> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com> Link: https://patch.msgid.link/20251201180739.2330474-1-joshua.hahnjy@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'tools/include/nolibc/compiler.h')
0 files changed, 0 insertions, 0 deletions