1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +00:00

Kernel: Enable SMAP protection during the execve() syscall

The userspace execve() wrapper now measures all the strings and puts
them in a neat and tidy structure on the stack.

This way we know exactly how much to copy in the kernel, and we don't
have to use the SMAP-violating validate_read_str(). :^)
This commit is contained in:
Andreas Kling 2020-01-10 12:20:36 +01:00
parent bf9f36bf22
commit 952bb95baa
4 changed files with 78 additions and 38 deletions

View file

@ -155,7 +155,7 @@ public:
int sys$ttyname_r(int fd, char*, ssize_t);
int sys$ptsname_r(int fd, char*, ssize_t);
pid_t sys$fork(RegisterDump&);
int sys$execve(const char* filename, const char** argv, const char** envp);
int sys$execve(const Syscall::SC_execve_params*);
int sys$getdtablesize();
int sys$dup(int oldfd);
int sys$dup2(int oldfd, int newfd);