mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
AK+Kernel: Remove implicit conversion from Userspace<T*> to FlatPtr
This feels like it was a refactor transition kind of conversion. The places that were relying on it can easily be changed to explicitly ask for the ptr() or a new vaddr() method on Userspace<T*>. FlatPtr can still implicitly convert to Userspace<T> because the constructor is not explicit, but there's quite a few more places that are relying on that conversion.
This commit is contained in:
committed by
Andreas Kling
parent
7243bcb7da
commit
f1d8978804
@@ -15,7 +15,7 @@
|
||||
|
||||
ErrorOr<NonnullOwnPtr<Kernel::KString>> try_copy_kstring_from_user(Userspace<const char*> user_str, size_t user_str_size)
|
||||
{
|
||||
bool is_user = Kernel::Memory::is_user_range(VirtualAddress(user_str), user_str_size);
|
||||
bool is_user = Kernel::Memory::is_user_range(user_str.vaddr(), user_str_size);
|
||||
if (!is_user)
|
||||
return EFAULT;
|
||||
Kernel::SmapDisabler disabler;
|
||||
|
||||
Reference in New Issue
Block a user