1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

SymbolServer+bt: Symbolicate kernel addresses if /boot/Kernel available

The /boot directory is only accessible to root by default, but anyone
wanting access to kernel symbols for development can get them by making
/boot/Kernel accessible to the "symbol" user.
This commit is contained in:
Andreas Kling 2021-02-04 22:53:33 +01:00
parent 3ff7b0ebfe
commit a5d89ca5df
2 changed files with 19 additions and 2 deletions

View file

@ -49,6 +49,14 @@ int main(int, char**)
return 1;
}
// NOTE: Developers can opt into kernel symbolication by making /boot/Kernel accessible to the "symbol" user.
if (access("/boot/Kernel", F_OK) == 0) {
if (unveil("/boot/Kernel", "r") < 0) {
perror("unveil");
return 1;
}
}
if (unveil(nullptr, nullptr) < 0) {
perror("unveil");
return 1;