summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorSamuel Moelius <sam.moelius@trailofbits.com>2026-06-05 21:41:52 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-21 21:37:37 +0300
commit5419cac89c0224b5acdbcda183a3c4809510ce95 (patch)
tree6810521bc21bdc5430b4e509899eb401fd763285 /scripts/Makefile.thinlto
parent6a66c557a2ab2609575bafd15e093669c05f9711 (diff)
downloadlinux-5419cac89c0224b5acdbcda183a3c4809510ce95.tar.xz
mm/page_frag: reject invalid CPUs in page_frag_test
The page_frag selftest module accepts test_push_cpu and test_pop_cpu as signed module parameters, then validates them by passing them directly to cpu_active(). That validation is itself unsafe for negative or out-of-range CPU numbers. For example, test_push_cpu=-1 is converted to a very large unsigned CPU number before cpu_active() reaches cpumask_test_cpu(), which trips the cpumask range check with CONFIG_DEBUG_PER_CPU_MAPS enabled. Reject CPU values outside [0, nr_cpu_ids) before asking whether the CPU is active. Assisted-by: Codex:gpt-5.5-cyber-preview Link: https://lore.kernel.org/20260605184157.2490353-1-sam.moelius@trailofbits.com Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com> Cc: David Hildenbrand <david@kernel.org> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions