Kernel: Don't use copy_from_user() for kernelspace read in perf events

Fixes #3182.
This commit is contained in:
Andreas Kling 2020-08-17 09:55:40 +02:00
parent 22f701d657
commit d5d54da0ea
Notes: sideshowbarker 2024-07-19 03:30:01 +09:00

View file

@ -66,9 +66,8 @@ KResult PerformanceEventBuffer::append(int type, FlatPtr arg1, FlatPtr arg2)
FlatPtr ebp;
asm volatile("movl %%ebp, %%eax"
: "=a"(ebp));
FlatPtr eip;
auto current_thread = Thread::current();
copy_from_user(&eip, (FlatPtr*)&current_thread->get_register_dump_from_stack().eip);
auto eip = current_thread->get_register_dump_from_stack().eip;
Vector<FlatPtr> backtrace;
{
SmapDisabler disabler;