[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161122193720.GA3045@worktop.programming.kicks-ass.net>
Date: Tue, 22 Nov 2016 20:37:20 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Andy Lutomirski <luto@...capital.net>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] x86: Verify access_ok() context
On Tue, Nov 22, 2016 at 09:28:01AM -0800, Andy Lutomirski wrote:
> On Tue, Nov 22, 2016 at 1:57 AM, Peter Zijlstra <peterz@...radead.org> 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.
Powered by blists - more mailing lists