mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Kernel: Fix SMAP in setkeymap syscall
It looks like setkeymap was missed when the SMAP functionality was introduced. Disable SMAP only in the scope where we actually read the usermode addresses.
This commit is contained in:
parent
e9a5b7456e
commit
9cac205d67
Notes:
sideshowbarker
2024-07-19 10:05:37 +09:00
Author: https://github.com/bgianfo
Commit: 9cac205d67
Pull-request: https://github.com/SerenityOS/serenity/pull/1071
1 changed files with 1 additions and 0 deletions
|
@ -3955,6 +3955,7 @@ int Process::sys$setkeymap(const Syscall::SC_setkeymap_params* params)
|
|||
if (!validate_read(altgr_map, 0x80))
|
||||
return -EFAULT;
|
||||
|
||||
SmapDisabler disabler;
|
||||
KeyboardDevice::the().set_maps(map, shift_map, alt_map, altgr_map);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue