[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrU_LTyc5oKPtO2pkKjRdPV4Pdzw4_TmcuyVUfTGfkB6jA@mail.gmail.com>
Date: Wed, 3 Feb 2021 12:14:24 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Borislav Petkov <bp@...en8.de>
Cc: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Yonghong Song <yhs@...com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 09/11] x86/fault: Rename no_context() to kernelmode_fixup_or_oops()
On Wed, Feb 3, 2021 at 12:07 PM Borislav Petkov <bp@...en8.de> wrote:
>
> On Wed, Feb 03, 2021 at 11:53:03AM -0800, Andy Lutomirski wrote:
> > I feel like that would be more obfuscated — then the function would
> > return without fixing anything for usermode faults, return after
> > fixing it for kernel mode faults, or oops.
>
> You practically pretty much have it already with the WARN_ON_ONCE. And
> you can make the thing return 1 to denote it was in user_mode() and 0
> otherwise. IINMSO, something like this:
Hmm. I'm not convinced this is really much better. Maybe it is. Let
me think about it. I feel like it's somehow too close to the previous
tangle where too many functions did too many different things.
Powered by blists - more mailing lists