mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 21:15:14 +00:00
Kernel: When userspaces calls a removed syscall, fail with ENOSYS
This is a bit gentler than jumping to 0x0, which always crashes the whole process. Also log a debug message about what happened, and let the user know that it's probably time to rebuild the program.
This commit is contained in:
parent
040fee370d
commit
c23addd1fb
Notes:
sideshowbarker
2024-07-19 11:09:44 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c23addd1fb0
1 changed files with 4 additions and 0 deletions
|
@ -86,6 +86,10 @@ int handle(RegisterDump& regs, u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
if (s_syscall_table[function] == nullptr) {
|
||||
dbg() << process << ": Null syscall " << function << " requested: \"" << to_string((Function)function) << "\", you probably need to rebuild this program.";
|
||||
return -ENOSYS;
|
||||
}
|
||||
return (process.*(s_syscall_table[function]))(arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue