1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +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:
Brian Gianforcaro 2020-01-13 01:26:20 -08:00 committed by Andreas Kling
parent e9a5b7456e
commit 9cac205d67

View file

@ -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;
}