diff options
author | Matthew Maurer <mmaurer@google.com> | 2024-10-16 02:16:38 +0300 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2024-10-20 00:35:07 +0300 |
commit | 3c5700aeabd87e81d9153a7666b28d0e405c6c88 (patch) | |
tree | b4f7ec59dbccd58bc0ac9d238f186b72e69b7253 /tools/perf/scripts/python/syscall-counts.py | |
parent | c92aab819d56d51631f0484ed7af11d9d8ff4cb0 (diff) | |
download | linux-3c5700aeabd87e81d9153a7666b28d0e405c6c88.tar.xz |
module: Factor out elf_validity_cache_secstrings
Factor out the validation of section names.
There are two behavioral changes:
1. Previously, we did not validate non-SHF_ALLOC sections.
This may have once been safe, as find_sec skips non-SHF_ALLOC
sections, but find_any_sec, which will be used to load BTF if that is
enabled, ignores the SHF_ALLOC flag. Since there's no need to support
invalid section names, validate all of them, not just SHF_ALLOC
sections.
2. Section names were validated *after* accessing them for the purposes
of detecting ".modinfo" and ".gnu.linkonce.this_module". They are now
checked prior to the access, which could avoid bad accesses with
malformed modules.
Signed-off-by: Matthew Maurer <mmaurer@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions