mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
Kernel: Disable big process lock for sys$getrandom
This syscall doesn't touch any intra-process shared resources and already holds the global kernel RNG lock so there's no reason to hold the big lock.
This commit is contained in:
parent
b1f4f6ee15
commit
48325e2959
Notes:
sideshowbarker
2024-07-18 07:23:43 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/48325e29598 Pull-request: https://github.com/SerenityOS/serenity/pull/9236 Reviewed-by: https://github.com/tomuta ✅
@ -154,7 +154,7 @@ enum class NeedsBigProcessLock {
|
||||
S(realpath, NeedsBigProcessLock::Yes) \
|
||||
S(get_process_name, NeedsBigProcessLock::Yes) \
|
||||
S(fchdir, NeedsBigProcessLock::Yes) \
|
||||
S(getrandom, NeedsBigProcessLock::Yes) \
|
||||
S(getrandom, NeedsBigProcessLock::No) \
|
||||
S(getkeymap, NeedsBigProcessLock::Yes) \
|
||||
S(setkeymap, NeedsBigProcessLock::Yes) \
|
||||
S(clock_gettime, NeedsBigProcessLock::Yes) \
|
||||
|
@ -15,7 +15,7 @@ namespace Kernel {
|
||||
// do, we should be able of the caveats that Linux has dealt with.
|
||||
KResultOr<FlatPtr> Process::sys$getrandom(Userspace<void*> buffer, size_t buffer_size, [[maybe_unused]] unsigned flags)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
VERIFY_NO_PROCESS_BIG_LOCK(this);
|
||||
REQUIRE_PROMISE(stdio);
|
||||
if (buffer_size > NumericLimits<ssize_t>::max())
|
||||
return EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user