[PATCH v4 1/2] powerpc: fix KUAP warning in VMX usercopy path
Madhavan Srinivasan
maddy at linux.ibm.com
Sun Mar 15 15:01:39 AEDT 2026
On Wed, 04 Mar 2026 17:52:00 +0530, Sayali Patil wrote:
> On powerpc with PREEMPT_FULL or PREEMPT_LAZY and function tracing enabled,
> KUAP warnings can be triggered from the VMX usercopy path under memory
> stress workloads.
>
> KUAP requires that no subfunctions are called once userspace access has
> been enabled. The existing VMX copy implementation violates this
> requirement by invoking enter_vmx_usercopy() from the assembly path after
> userspace access has already been enabled. If preemption occurs
> in this window, the AMR state may not be preserved correctly,
> leading to unexpected userspace access state and resulting in
> KUAP warnings.
>
> [...]
Applied to powerpc/fixes.
[1/2] powerpc: fix KUAP warning in VMX usercopy path
https://git.kernel.org/powerpc/c/6bc9c0a905228bea5c53ec195fe54f5f0233dccc
[2/2] powerpc/selftests/copyloops: extend selftest to exercise __copy_tofrom_user_power7_vmx
https://git.kernel.org/powerpc/c/146c9ab38b48004b40735b6c1e1c2b5adf6436f9
cheers
More information about the Linuxppc-dev
mailing list