Commit Graph

17 Commits

Author SHA1 Message Date
28c28eb11a kernel-symbol: respect ENABLE_POLKIT setting
This fixes the compilation when we have sysprofd fully disabled.
That is not an ideal configuration, but keeping it working
ensures that some of the code is easy copy/paste'able in the
future for some situations.
2018-08-28 12:22:57 -07:00
20e4204919 kernel: use "Kernel" instead of "Linux"
It's more clear about that a nebulous term like Linux.
2018-06-16 19:39:18 -07:00
3b3252e050 kernel-symbol: delay symbol filtering until lookup
We don't want to avoid adding the symbols to the index table, or we will
get the wrong addresses.

So instead, add them, and then ignore the symbols upon lookup.
2018-01-29 02:09:31 -08:00
2f6b01781f elf: ignore address context that is not user
We should be betting a context change as part of the stack, so ignore it
if we didn't get a user context.
2018-01-29 01:38:35 -08:00
deecb04963 kernel-symbol: code style cleanup 2018-01-29 01:38:35 -08:00
1bc52902eb kernel-symbols: avoid symbols not in text (code) section
Those are defind as t or T type.
2018-01-29 01:38:35 -08:00
8fb46f3e7f kernel-symbol: fix result parsing from sysprofd
We need to add an additional () around our result type from sysprofd.
2018-01-29 01:38:35 -08:00
911d51d447 kallsyms: make SpKallsyms more testable
This allows us to pass in the file to read from, and adds a quick test
case to view the parsed output. It also fixes a base-10 vs base-16
mistake in parsing addresses.
2018-01-29 01:38:35 -08:00
bb78a1c165 elf: only resolve addresses in none/user address context
This ensures that we only try to resolve addresses for ELFs when we know
we're inside of the userspace address context.
2018-01-28 22:14:32 -08:00
aa0506e26f symbol-resolver: check for kernel address context
We only want to resolve a symbol if we're inside the kernel context.
Otherwise, it wont be accurate.
2018-01-28 22:13:49 -08:00
df07f6d915 resolver: extend interface to include address context
We might need access to the address context when resolving symbols so that
we know if the address range applies to us.
2018-01-28 22:12:27 -08:00
128aa18a00 lib: query /proc/kallsyms and/or daemon for symbols
If we have a system where we can read kallsyms without elevated
privilledges do that. Otherwise, query the sysprod daemon to get the
available kernel symbols.
2018-01-28 21:34:44 -08:00
cf756c65aa kernel-symbol-resolver: code style cleanup 2018-01-28 21:26:47 -08:00
0e8b51c6ab kernel: only try to load kernel symbol map once
If we fail, log a message to the console and bail. This seems to happen
with recent kernel changes.
2018-01-27 01:10:00 -08:00
00b6892a72 build: fix header installation paths 2017-09-28 17:45:07 -07:00
190faa818d build: use subdir meson.build files
This keeps the build file closer to the sources it effects.
2017-09-28 16:57:00 -07:00
c47822b26e source tree cleanup
The lib/ directory was getting a bit out of hand, so this tries
to organize things a bit so it is easier going forward to locate
the code people want to patch.
2017-09-28 16:23:03 -07:00