Kernel: Reject sigaction() with SA_SIGINFO

We can't handle this, so let sigaction() fail instead of PANIC()'ing
later when we try to dispatch a signal with SA_SIGINFO set.
This commit is contained in:
Ali Mohammad Pur 2022-02-24 22:29:45 +03:30 committed by Andreas Kling
parent cf63447044
commit 848eaf2220
Notes: sideshowbarker 2024-07-17 17:57:25 +09:00

View file

@ -68,6 +68,8 @@ ErrorOr<FlatPtr> Process::sys$sigaction(int signum, Userspace<const sigaction*>
}
if (user_act) {
auto act = TRY(copy_typed_from_user(user_act));
if (act.sa_flags & SA_SIGINFO)
return ENOTSUP;
action.mask = act.sa_mask;
action.flags = act.sa_flags;
action.handler_or_sigaction = VirtualAddress { reinterpret_cast<void*>(act.sa_sigaction) };