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

Kernel: Rename Process::is_ring0/3 to Process::is_kernel/user_process

Since "rings" typically refer to code execution and user processes
can also execute in ring 0, rename these functions to more accurately
describe what they mean: kernel processes and user processes.
This commit is contained in:
Tom 2020-09-10 09:46:24 -06:00 committed by Andreas Kling
parent 19ffd9d677
commit 0fab0ee96a
8 changed files with 18 additions and 23 deletions

View file

@ -34,8 +34,8 @@ KResult Process::do_kill(Process& process, int signal)
// FIXME: Should setuid processes have some special treatment here?
if (!is_superuser() && m_euid != process.m_uid && m_uid != process.m_uid)
return KResult(-EPERM);
if (process.is_ring0() && signal == SIGKILL) {
klog() << "attempted to send SIGKILL to ring 0 process " << process.name().characters() << "(" << process.pid().value() << ")";
if (process.is_kernel_process() && signal == SIGKILL) {
klog() << "attempted to send SIGKILL to kernel process " << process.name().characters() << "(" << process.pid().value() << ")";
return KResult(-EPERM);
}
if (signal != 0)