[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1701191910080.5358@nanos>
Date: Thu, 19 Jan 2017 19:12:48 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: David Smith <dsmith@...hat.com>
cc: Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...capital.net>,
Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Frank Ch. Eigler" <fche@...hat.com>
Subject: Re: [RFC][PATCH] x86: Verify access_ok() context
On Wed, 18 Jan 2017, David Smith wrote:
> On 01/16/2017 03:14 PM, Thomas Gleixner wrote:
> >> If you put that new access_ok() call in a module that gets
> >> loaded/unloaded, you see one warning for every module load, which gets a
> >> bit annoying.
> >
> > Can you please elaborate where this access_ok() is placed in the module
> > code?
>
> It doesn't really matter where you place the access_ok() call in the
> module code.
It does matter very much, because the fact that the warning triggers tells
me that it's placed in code which is NOT executed in task context.
> If you call access_ok() in a module, then that module has
> its own WARN_ON_ONCE() static variable. If access_ok() was a function
> exported from the kernel, then there would be only one copy of the
> WARN_ON_ONCE() static variable.
Not a big deal. If access_ok() is called from the wrong context in that
module then this should be fixed and not the warning supressed.
We are not papering over problems.
Thanks,
tglx
Powered by blists - more mailing lists