mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-24 23:23:58 +00:00
Kernel: Emit ProcFS pledge/veil properties as "N/A" for kernel processes
Pledges and Veil state don't really make sense for kernel mode processes, as they can do what ever they want since they are in kernel mode. Make this clear in the system monitor UI by marking these entries as null.
This commit is contained in:
parent
6fa76ed2e3
commit
c44d2515b4
Notes:
sideshowbarker
2024-07-19 03:30:08 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/c44d2515b4c Pull-request: https://github.com/SerenityOS/serenity/pull/3170
1 changed files with 19 additions and 13 deletions
|
@ -824,7 +824,9 @@ static Optional<KBuffer> procfs$all(InodeIdentifier)
|
|||
auto build_process = [&](const Process& process) {
|
||||
auto process_object = array.add_object();
|
||||
|
||||
if (process.is_ring3()) {
|
||||
StringBuilder pledge_builder;
|
||||
|
||||
#define __ENUMERATE_PLEDGE_PROMISE(promise) \
|
||||
if (process.has_promised(Pledge::promise)) { \
|
||||
pledge_builder.append(#promise " "); \
|
||||
|
@ -845,6 +847,10 @@ static Optional<KBuffer> procfs$all(InodeIdentifier)
|
|||
process_object.add("veil", "Locked");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
process_object.add("pledge", String());
|
||||
process_object.add("veil", String());
|
||||
}
|
||||
|
||||
process_object.add("pid", process.pid().value());
|
||||
process_object.add("pgid", process.tty() ? process.tty()->pgid().value() : 0);
|
||||
|
|
Loading…
Reference in a new issue