summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorSergey Gordeychik <scadastrangelove@gmail.com>2026-08-28 12:07:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-17 10:22:00 +0100
commitcad5591bc098ab367682e483ea7b34166cefdf12 (patch)
tree65a6b2f6e00241d17a3e49fe832ce3eb27f15828 /tools/perf/scripts/python/stackcollapse.py
parent8eb05e8e47f1a56042a4ac113e84b68a6d0fda6d (diff)
downloadlinux-next-cad5591bc098ab367682e483ea7b34166cefdf12.tar.gz
linux-next-cad5591bc098ab367682e483ea7b34166cefdf12.zip
rust_binder: use KVVec for files_to_translate
The num_fds value in a binder_fd_array_object is bounded by the transaction buffer. However, its in-kernel metadata is larger than the u32 array on the wire. On 64-bit systems, FileEntry occupies 24 bytes. About 900,000 entries therefore make files_to_translate request roughly 20.6 MiB of physically contiguous memory, triggering a warning in __alloc_frozen_pages_noprof. translate_fds() later allocates Reservation entries from the same count. At 16 bytes per entry, this requires another 13.7 MiB contiguous allocation. Neither vector requires physical contiguity. Use KVVec for both so large allocations can fall back to vmalloc. Tested under QEMU/KVM. The 900,000-entry reproducer no longer triggers a page allocator warning, and a 300,000-entry transaction that repeats one valid fd reaches translate_fds() without WARN or BUG. Found with the rust-in-peace agentic pipeline (https://github.com/scadastrangelove/rust-in-peace). Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Sergey Gordeychik <scadastrangelove@gmail.com> Link: https://patch.msgid.link/20260828090757.96282-1-scadastrangelove@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions