Thread (29 messages) 29 messages, 7 authors, 2019-02-13

Re: [PATCH v3 3/4] uaccess: Check no rescheduling function is called in unsafe region

flat view

From: Peter Zijlstra <peterz@infradead.org>
Date: 2019-02-13 14:41:53
Also in: lkml

On Wed, Feb 13, 2019 at 02:39:22PM +0000, Julien Thierry wrote:
Hi Peter,

On 13/02/2019 14:25, Peter Zijlstra wrote:
quoted
On Wed, Feb 13, 2019 at 02:00:26PM +0000, Will Deacon wrote:
quoted
The difference is because getting preempted in the sequence above is
triggered off the back of an interrupt. On arm64, and I think also on x86,
the user access state (SMAP or PAN) is saved and restored across exceptions
but not across context switch.
A quick reading of the SDM seems to suggest the SMAP state is part of
EFLAGS, which is context switched just fine AFAIK.
I fail to see where this is happening when looking at the switch_to()
logic in x86_64.
Yeah, me too.. we obviously preserve EFLAGS for user context, but for
kernel-kernel switches we do not seem to preserve it :-(


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help