aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/symbolizer/nm.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/symbolizer: introduce Symbolizer interfaceTaras Madan2025-03-071-2/+2
| | | | To simplify interface Read*Symbols were moved out from symbolizer.Symbolizer.
* pkg/symbolizer: remove unused parameter: targetJoey Jiao2024-05-091-7/+5
|
* all: use special placeholder for errorsTaras Madan2023-07-241-2/+2
|
* pkg/symbolizer: skip the elf.SHF_WRITE checkAleksandr Nogikh2023-07-131-1/+2
| | | | | | | | | The remaining checks (elf.SHF_ALLOC and elf.SHF_EXECINSTR) seem to a good enough filter for matching symbols. Additionally, there have already been cases when absolutely valid functions ended up in SHF_WRITE sections: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=0fddb79bf283
* pkg/symbolizer: match kernel symbol size calculationDmitry Vyukov2022-10-061-9/+33
| | | | | | | Function sizes reported by the Linux kernel do not match symbol tables. The kernel computes size of a symbol based on the start of the next symbol. We need to do the same to match kernel sizes to be able to find the right symbol across multiple symbols with the same name.
* pkg/symbolizer: extend error messageDmitry Vyukov2022-01-201-1/+1
|
* pkg/symbolizer: switch to debug/elf for symbol extractionDmitry Vyukov2022-01-131-61/+23
| | | | Using debug/elf is better on all fronts: faster, simpler, no external deps.
* pkg: support compiler triple for 'nm' and 'addr2line'Alexander Egorenkov2020-06-181-6/+11
| | | | In preparation to support big-endian architectures.
* tools/syz-check: check netlink policy descriptionsDmitry Vyukov2020-01-221-6/+22
| | | | | | | | | | | | | | Overall idea of netlink checking. Currnetly we check netlink policies for common detectable mistakes. First, we detect what looks like a netlink policy in our descriptions (these are structs/unions only with nlattr/nlnext/nlnetw fields). Then we find corresponding symbols (offset/size) in vmlinux using nm. Then we read elf headers and locate where these symbols are in the rodata section. Then read in the symbol data, which is an array of nla_policy structs. These structs allow to easily figure out type/size of attributes. Finally we compare our descriptions with the kernel policy description. Update #590
* pkg/symbolizer: favor portable nm(1) formatAnton Lindqvist2018-09-241-10/+17
| | | | | | | | | On OpenBSD, nm(1) does not support the `-S' option. The order of symbols from nm(1) varies between platforms, therefore rework the test case to cope with that. Fixes #723
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-1/+1
| | | | Fix typos, non-canonical code, remove dead code, etc.
* pkg/osutil: don't leace runaway processesDmitry Vyukov2017-11-161-2/+3
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* pkg/symbolizer: move from symbolizerDmitry Vyukov2017-06-171-0/+69