1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

Kernel: Use copy_from_user() in ptrace(PT_PEEK)

This commit is contained in:
Andreas Kling 2020-04-13 22:39:07 +02:00
parent 1d43544e08
commit e432a27676

View file

@ -114,10 +114,7 @@ KResultOr<u32> handle_syscall(const Kernel::Syscall::SC_ptrace_params& params, P
if (result.is_error())
return -EFAULT;
peer->process().validate_write(peek_params.out_data, sizeof(u32));
{
SmapDisabler disabler;
*(peek_params.out_data) = result.value();
}
copy_from_user(peek_params.out_data, &result.value());
break;
}