On Tue, Nov 22, 2016 at 09:28:01AM -0800, Andy Lutomirski wrote:
> On Tue, Nov 22, 2016 at 1:57 AM, Peter Zijlstra <[email protected]> wrote:
> > +#define access_ok(type, addr, size) \
> > +({ \
> > + WARN_ON_ONCE(!in_task()); \
>
> Should this be guarded by some debug option? This may hurt
> performance on production systems quite a bit.
I suspected something like that; any suitable CONFIG come to mind? I'm
somewhat reluctant to create yet another one for this.
CONFIG_DEBUG_VM seems somehow inappropriate.
> For what it's worth, I think ARM recently started saving the address
> limit and resetting it to USER_DS on NMI entry.
Up to them of course, but doing less on interrupt entry/exit seems
better.