diff options
author | D Scott Phillips <[email protected]> | 2021-12-20 15:41:14 -0800 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2021-12-22 15:18:19 +0000 |
commit | 38e0257e0e6f4fef2aa2966b089b56a8b1cfb75c (patch) | |
tree | 0ece901d404cbb8fc591a1304dc513c6a1ef0055 /net/lapb/lapb_in.c | |
parent | 31e833b2031232493f2c30e53401e1f5ba293f97 (diff) |
arm64: errata: Fix exec handling in erratum 1418040 workaround
The erratum 1418040 workaround enables CNTVCT_EL1 access trapping in EL0
when executing compat threads. The workaround is applied when switching
between tasks, but the need for the workaround could also change at an
exec(), when a non-compat task execs a compat binary or vice versa. Apply
the workaround in arch_setup_new_exec().
This leaves a small window of time between SET_PERSONALITY and
arch_setup_new_exec where preemption could occur and confuse the old
workaround logic that compares TIF_32BIT between prev and next. Instead, we
can just read cntkctl to make sure it's in the state that the next task
needs. I measured cntkctl read time to be about the same as a mov from a
general-purpose register on N1. Update the workaround logic to examine the
current value of cntkctl instead of the previous task's compat state.
Fixes: d49f7d7376d0 ("arm64: Move handling of erratum 1418040 into C code")
Cc: <[email protected]> # 5.9.x
Signed-off-by: D Scott Phillips <[email protected]>
Reviewed-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions