summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts-by-pid.py
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2024-10-30 19:14:49 +0300
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2024-10-31 05:00:58 +0300
commit3fbff988892993a144d0f47db0348c18b4621393 (patch)
tree2f6cc97c4d457e696cecddd8b2f5a94250297609 /tools/perf/scripts/python/syscall-counts-by-pid.py
parentda93dd931baa921ee31796e0cd6402d995e1e4fc (diff)
downloadlinux-3fbff988892993a144d0f47db0348c18b4621393.tar.xz
kprobes: Use struct_size() in __get_insn_slot()
__get_insn_slot() allocates 'struct kprobe_insn_page' using a custom structure size calculation macro, KPROBE_INSN_PAGE_SIZE. Replace KPROBE_INSN_PAGE_SIZE with the struct_size() macro, which is the preferred way to calculate the size of flexible structures in the kernel because it handles overflow and makes it easier to change and audit how flexible structures are allocated across the entire tree. Link: https://lore.kernel.org/all/20241030-kprobes-fix-counted-by-annotation-v1-2-8f266001fad0@kernel.org/ (Masami modofied this to be applicable without the 1st patch in the series.) Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions