mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:18:11 +00:00
Kernel: Remove SmapDisabler in sys$ioctl()
Use copy_{to,from}_user() in the various File::ioctl() implementations instead of disabling SMAP wholesale in sys$ioctl(). This patch does not port IPv4Socket::ioctl() to those API's since that will be more involved. That function now creates a local SmapDisabler.
This commit is contained in:
parent
be7add690d
commit
292cd53192
5 changed files with 78 additions and 51 deletions
|
@ -466,6 +466,8 @@ int IPv4Socket::ioctl(FileDescription&, unsigned request, FlatPtr arg)
|
|||
{
|
||||
REQUIRE_PROMISE(inet);
|
||||
|
||||
SmapDisabler disabler;
|
||||
|
||||
auto ioctl_route = [request, arg]() {
|
||||
auto* route = (rtentry*)arg;
|
||||
if (!Process::current()->validate_read_typed(route))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue