mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
Kernel: Utilize AK::Userspace<T> in the ioctl interface
It's easy to forget the responsibility of validating and safely copying kernel parameters in code that is far away from syscalls. ioctl's are one such example, and bugs there are just as dangerous as at the root syscall level. To avoid this case, utilize the AK::Userspace<T> template in the ioctl kernel interface so that implementors have no choice but to properly validate and copy ioctl pointer arguments.
This commit is contained in:
parent
0bb3d83a48
commit
9a04f53a0f
Notes:
sideshowbarker
2024-07-18 08:17:47 +09:00
Author: https://github.com/bgianfo
Commit: 9a04f53a0f
Pull-request: https://github.com/SerenityOS/serenity/pull/9019
Reviewed-by: https://github.com/alimpfard ✅
16 changed files with 99 additions and 93 deletions
|
@ -46,7 +46,7 @@ public:
|
|||
virtual KResult setsockopt(int level, int option, Userspace<const void*>, socklen_t) override;
|
||||
virtual KResult getsockopt(FileDescription&, int level, int option, Userspace<void*>, Userspace<socklen_t*>) override;
|
||||
|
||||
virtual int ioctl(FileDescription&, unsigned request, FlatPtr arg) override;
|
||||
virtual int ioctl(FileDescription&, unsigned request, Userspace<void*> arg) override;
|
||||
|
||||
bool did_receive(const IPv4Address& peer_address, u16 peer_port, ReadonlyBytes, const Time&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue