linux/tools/mm
Yichong Chen 3ef8e3fdc8 tools/mm/page_owner_sort: bound pattern output copies
search_pattern() copies a regex capture into caller-provided buffers
without knowing their sizes.  Several callers pass fixed-size buffers,
including FIELD_BUFF and TASK_COMM_LEN.

Pass the destination size to search_pattern(), reject captures that do not
fit before copying them, and terminate the output string inside
search_pattern().

Link: https://lore.kernel.org/20260629014316.130307-4-chenyichong@uniontech.com
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
Cc: Vishal Moola <vishal.moola@gmail.com>
Cc: Ye Liu <ye.liu@linux.dev>
Cc: Zhen Ni <zhen.ni@easystack.cn>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-07-30 19:40:50 -07:00
..
.gitignore tools/mm: add thp_swap_allocator_test binary to .gitignore 2026-07-28 21:11:43 -07:00
Makefile tools/mm: add page_owner_filter userspace tool 2026-07-28 21:11:54 -07:00
page_owner_filter.c tools/mm: add page_owner_filter userspace tool 2026-07-28 21:11:54 -07:00
page_owner_sort.c tools/mm/page_owner_sort: bound pattern output copies 2026-07-30 19:40:50 -07:00
page-types.c tools/mm/page-types: fix kpageflags option argument in getopt_long 2026-06-02 15:22:18 -07:00
show_page_info.py tools/mm: add script to display page state for a given PID and VADDR 2025-07-09 22:41:53 -07:00
slabinfo-gnuplot.sh
slabinfo.c tools/mm/slabinfo: fix total_objects attribute name 2026-06-18 11:19:43 +02:00
thp_swap_allocator_test.c tools/mm/thp_swap_allocator_test: fix small folio alignment 2026-01-20 19:24:42 -08:00
thpmaps tools/mm: add thpmaps script to dump THP usage info 2024-02-22 10:24:38 -08:00