On Wed, Feb 03, 2021 at 12:14:24PM -0800, Andy Lutomirski wrote:
> 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.
I know what you mean.
On Wed, Feb 3, 2021 at 12:07 PM Borislav Petkov 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
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
> On Feb 3, 2021, at 11:39 AM, Borislav Petkov wrote:
>
> On Sun, Jan 31, 2021 at 09:24:40AM -0800, Andy Lutomirski wrote:
>> The name no_context() has never been very clear. It's only called for
>> faults from kernel mode, so rename it and change the no-longer-useful
>> user_mode(regs)
On Sun, Jan 31, 2021 at 09:24:40AM -0800, Andy Lutomirski wrote:
> The name no_context() has never been very clear. It's only called for
> faults from kernel mode, so rename it and change the no-longer-useful
> user_mode(regs) check to a WARN_ON_ONCE.
>
> Cc: Dave Hansen
> Cc: Peter Zijlstra
>
On Mon, Feb 1, 2021 at 1:14 AM Christoph Hellwig wrote:
>
> On Sun, Jan 31, 2021 at 09:24:40AM -0800, Andy Lutomirski wrote:
> > + kernelmode_fixup_or_oops(regs, error_code, address, pkey,
> > si_code);
>
> > if (!user_mode(regs)) {
> > - no_context(regs,
On Sun, Jan 31, 2021 at 09:24:40AM -0800, Andy Lutomirski wrote:
> + kernelmode_fixup_or_oops(regs, error_code, address, pkey,
> si_code);
> if (!user_mode(regs)) {
> - no_context(regs, error_code, address, SIGBUS, BUS_ADRERR);
> +
The name no_context() has never been very clear. It's only called for
faults from kernel mode, so rename it and change the no-longer-useful
user_mode(regs) check to a WARN_ON_ONCE.
Cc: Dave Hansen
Cc: Peter Zijlstra
Signed-off-by: Andy Lutomirski
---
arch/x86/mm/fault.c | 28
8 matches
Mail list logo