-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btf,info: Fix bad instruction offset when parsing infos from kernel
When BTF ext info is encoded in ELF the instruction offsets are in bytes, but when you pass them to the kernel they must be instruction indecies. Therefor we devide the offset by the instruction size in the parsing logic for ELF. This was missed during the initial implementation of reading back BTF ext info from the kernel. This would cause an error when loading back ext info which was not a multiple of the instruction size or a bad instruction offset if it was. This commit adds an argument to the parsing logic to specify where the ext info is being read from. It also adds `LoadKernelLineInfos` and `LoadKernelFuncInfos` to load the ext info from the kernel, using the correct direction enum internaly. These are now used by the `info` package. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
- Loading branch information
1 parent
ed9bf3b
commit b906189
Showing
3 changed files
with
122 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters