Kernel: fix signal handler block mask restoration

This commit is contained in:
2026-05-26 02:17:08 +03:00
parent c0ce647c74
commit becfa228fe
3 changed files with 6 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ signal_trampoline:
addl $24, %esp addl $24, %esp
// restore sigmask // restore sigmask
movl $83, %eax // SYS_SIGPROCMASK movl $79, %eax // SYS_SIGPROCMASK
movl $3, %ebx // SIG_SETMASK movl $3, %ebx // SIG_SETMASK
leal 72(%esp), %ecx // set leal 72(%esp), %ecx // set
xorl %edx, %edx // oset xorl %edx, %edx // oset

View File

@@ -61,7 +61,7 @@ signal_trampoline:
addq $40, %rsp addq $40, %rsp
// restore sigmask // restore sigmask
movq $83, %rdi // SYS_SIGPROCMASK movq $79, %rdi // SYS_SIGPROCMASK
movq $3, %rsi // SIG_SETMASK movq $3, %rsi // SIG_SETMASK
leaq 192(%rsp), %rdx // set leaq 192(%rsp), %rdx // set
xorq %r10, %r10 // oset xorq %r10, %r10 // oset

View File

@@ -10,10 +10,14 @@
#include <kernel/Thread.h> #include <kernel/Thread.h>
#include <kernel/Timer/Timer.h> #include <kernel/Timer/Timer.h>
#include <kernel/UserCopy.h> #include <kernel/UserCopy.h>
#include <sys/syscall.h>
namespace Kernel namespace Kernel
{ {
static_assert(SYS_SIGPROCMASK == 79, "this is hard coded in arch/*/Signal.S");
static_assert(SIG_SETMASK == 3, "this is hard coded in arch/*/Signal.S");
#if ARCH(x86_64) #if ARCH(x86_64)
static constexpr vaddr_t s_user_stack_addr_start = 0x0000700000000000; static constexpr vaddr_t s_user_stack_addr_start = 0x0000700000000000;
#elif ARCH(i686) #elif ARCH(i686)