summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/setuid.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-20 18:36:47 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-20 18:36:47 +0200
commit998c1152efa116da5fabf89363d178c8fb729d77 (patch)
tree9d7933b4da425af5896e304a0fff51c4bced3297 /Kernel/Syscalls/setuid.cpp
parent122d7d95336e6ea82e92ddcefe6254d05bcfd194 (diff)
downloadserenity-998c1152efa116da5fabf89363d178c8fb729d77.zip
Kernel: Mark syscalls that get/set user/group ID as not needing big lock
Now that these operate on the neatly atomic and immutable Credentials object, they should no longer require the process big lock for synchronization. :^)
Diffstat (limited to 'Kernel/Syscalls/setuid.cpp')
-rw-r--r--Kernel/Syscalls/setuid.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Kernel/Syscalls/setuid.cpp b/Kernel/Syscalls/setuid.cpp
index 758e09f4e6..0f22eabb42 100644
--- a/Kernel/Syscalls/setuid.cpp
+++ b/Kernel/Syscalls/setuid.cpp
@@ -10,7 +10,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$seteuid(UserID new_euid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
if (new_euid == (uid_t)-1)
@@ -41,7 +41,7 @@ ErrorOr<FlatPtr> Process::sys$seteuid(UserID new_euid)
ErrorOr<FlatPtr> Process::sys$setegid(GroupID new_egid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
if (new_egid == (uid_t)-1)
@@ -72,7 +72,7 @@ ErrorOr<FlatPtr> Process::sys$setegid(GroupID new_egid)
ErrorOr<FlatPtr> Process::sys$setuid(UserID new_uid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
if (new_uid == (uid_t)-1)
@@ -103,7 +103,7 @@ ErrorOr<FlatPtr> Process::sys$setuid(UserID new_uid)
ErrorOr<FlatPtr> Process::sys$setgid(GroupID new_gid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
if (new_gid == (uid_t)-1)
@@ -134,7 +134,7 @@ ErrorOr<FlatPtr> Process::sys$setgid(GroupID new_gid)
ErrorOr<FlatPtr> Process::sys$setreuid(UserID new_ruid, UserID new_euid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
auto credentials = this->credentials();
@@ -171,7 +171,7 @@ ErrorOr<FlatPtr> Process::sys$setreuid(UserID new_ruid, UserID new_euid)
ErrorOr<FlatPtr> Process::sys$setresuid(UserID new_ruid, UserID new_euid, UserID new_suid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
auto credentials = this->credentials();
@@ -207,7 +207,7 @@ ErrorOr<FlatPtr> Process::sys$setresuid(UserID new_ruid, UserID new_euid, UserID
ErrorOr<FlatPtr> Process::sys$setresgid(GroupID new_rgid, GroupID new_egid, GroupID new_sgid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
auto credentials = this->credentials();
@@ -243,7 +243,7 @@ ErrorOr<FlatPtr> Process::sys$setresgid(GroupID new_rgid, GroupID new_egid, Grou
ErrorOr<FlatPtr> Process::sys$setgroups(size_t count, Userspace<GroupID const*> user_gids)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::id));
auto credentials = this->credentials();