Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cc: remove a spurious check for UID 0
This drops an hardcoded check for the root user-ID before accessing `/proc/kallsyms`, in order to fix a bug which is preventing proper kernel symbols resolution by non-root users. The `/proc/kallsyms` file is generally available to non-privileged users: ``` > runuser -u nobody -- wc -l /proc/kallsyms 217514 /proc/kallsyms ``` Its content is further controlled by the `CAP_SYSLOG` capability through `/proc/sys/kernel/kptr_restrict`: https://man7.org/linux/man-pages/man7/capabilities.7.html As such, it is better to directly open it and rely on `fopen()` for privileges checking.
- Loading branch information