lkml.org 
[lkml]   [2021]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/11] x86/fault: Improve kernel-executing-user-memory handling
On Sun, Jan 31, 2021 at 09:24:37AM -0800, Andy Lutomirski wrote:
> Right now we treat the case of the kernel trying to execute from user
> memory more or less just like the kernel getting a page fault on a user
> access. In the failure path, we check for erratum #93, try to otherwise
> fix up the error, and then oops.
>
> If we manage to jump to the user address space, with or without SMEP, we
> should not try to resolve the page fault. This is an error, pure and
> simple. Rearrange the code so that we catch this case early, check for
> erratum #93, and bail out.

And I'm scratching my head why are you talking about kernel trying
to execute from user memory but doh, that erratum truncates the high
32-bits of rIP and the #PF address looks like a user address but
X86_PF_USER is clear.

Aha.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-02-03 17:25    [W:0.171 / U:7.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site