Re: [RFC][PATCH] x86: Verify access_ok() context
From: Peter Zijlstra
Date: Fri Jan 20 2017 - 03:24:17 EST
On Wed, Jan 18, 2017 at 04:19:47PM -0800, Andy Lutomirski wrote:
> ISTM even with pagefault_disable() in play, using access_ok() from,
> say, interrupt context is dangerous unless you've first checked that
> you're in a task. But I guess that in_task() would still return
> false, e.g. in perf.
The test was created exactly because perf was using access_ok()
_wrongly_. See commit: ae31fe51a3cc ("perf/x86: Restore TASK_SIZE check
on frame pointer").