]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
x86: add sigreturn trampoline and fix execve stack usage
authorTulio A M Mendes <[email protected]>
Mon, 9 Feb 2026 20:59:27 +0000 (17:59 -0300)
committerTulio A M Mendes <[email protected]>
Mon, 9 Feb 2026 20:59:27 +0000 (17:59 -0300)
commitb12e247e7ec24ab8f96bad950579babdc6073185
tree0d4a6f3c87c0b3b32f69296328fc42969cf358f8
parent708d2135d9a29ccfc79c15b81d15dcc90efcf687
x86: add sigreturn trampoline and fix execve stack usage

Implement SYSCALL_SIGRETURN and userland signal trampoline/sigframe so handlers can return safely.
Fix x86 signal delivery stack layout to avoid clobbering sigframe/trampoline.
Fix execve heap corruption by avoiding large on-stack argv/envp buffers and adding cleanup.
Add init.elf smoke test for sigreturn.
include/errno.h
include/syscall.h
src/arch/x86/idt.c
src/kernel/syscall.c
user/init.c