Re: [PATCHv4 14/17] arm64: uaccess: remove set_fs()
flat view
From: Mark Rutland <mark.rutland@arm.com>
Date: 2020-11-17 10:45:41
On Mon, Nov 16, 2020 at 05:40:48PM +0000, Catalin Marinas wrote:
Hi Mark, On Fri, Nov 13, 2020 at 12:49:34PM +0000, Mark Rutland wrote:quoted
We no longer need to flip UAO to access kernel memory under KERNEL_DS, and head.S unconditionally clears UAO for all kernel configurations via an ERET in init_kernel_el. Thus, we don't need to dynamically flip UAO, nor do we need to context-switch it. However, we do need to clear UAO (and set PAN) during SDEI entry.If the kernel never sets the UAO bit, why do we need to clear it during SDEI entry?
The fear was taking an SDEI event from a VM which had UAO set, with the SDEI FW not clearing UAO. That might not happen in practice because while the spec implies that could happen, TF-A currently generates a new PSTATE from scratch, and going forward the spec will be aligned with regular exception entry rules for PSTATE (so UAO will be cleared automatically). So we can probably drop the clearing of UAO if you prefer. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel