[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgq1eEoUFK5mSUM6d53USDRaWY4G+ctTNEw9w_PsUqf1w@mail.gmail.com>
Date: Sun, 24 Nov 2024 14:03:16 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Laight <David.Laight@...lab.com>
Cc: Andrew Cooper <andrew.cooper3@...rix.com>, "bp@...en8.de" <bp@...en8.de>,
Josh Poimboeuf <jpoimboe@...nel.org>, "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Arnd Bergmann <arnd@...nel.org>,
Mikel Rychliski <mikel@...elr.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2] x86: Allow user accesses to the base of the guard page
On Sun, 24 Nov 2024 at 12:49, David Laight <David.Laight@...lab.com> wrote:
>
> Doesn't that just need a <= changed to < ?
> (And possibly of name)
Well, more importantly, it means that we can't use the same helper
function at all.
> > but I suspect that I'm too chicken to actually do that.
> >
> > Please somebody convince me.
>
> I didn't know you really had a 'chicken streak' :-)
Actually, looking at some of the users of access_ok(), my chicken
streak just got wider.
Most of them are trivial, but when masking out the pure 'sizeof(x)'
things (that the "statically smaller than one page" case will filter
out anyway), there's a few scary ones in the vhost code and the drm
code that makes me go "those are checking ring buffer sizes and may
not access the end result in any order".
So trying to optimize access_ok() is probably not worth the heartburn. Oh well.
Linus
Powered by blists - more mailing lists