Thread (24 messages) 24 messages, 3 authors, 2020-10-01

Re: [PATCH 11/13] arm64: uaccess: remove set_fs()

flat view

From: Mark Rutland <mark.rutland@arm.com>
Date: 2020-09-28 09:04:01

On Mon, Sep 28, 2020 at 09:04:43AM +0200, Christoph Hellwig wrote:
quoted
+static inline void init_hw_uaccess_state(void)
 {
+	asm(ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN));
+	asm(ALTERNATIVE("nop", SET_PSTATE_UAO(0), ARM64_HAS_UAO));
 }
The way I read this code it is about per-task state, maybe that
could be reflected in the name?  init_task_hw_access_state or
init_task_uaccess_flags?
My intent writing this was that this resets the HW into the expected
ambient state common to all tasks, so I don't think about this as a
per-task thing (but I agree the transient PAN toggling for atomics means
PAN is per-task state).

I'd prefer not to put 'task' in the name as to me that implies messing
with something like task_struct or other SW state, but if you have
strong feeling about this, I think something like
init_task_hw_access_state() would be fine.

Thanks,
Mark.

_______________________________________________
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