Re: [PATCH v3] xtensa: align: validate access in fast_load_store
From: Max Filippov
Date: Mon Dec 15 2025 - 10:12:06 EST
On Mon, Dec 15, 2025 at 6:33 AM Ricky Ringler
<richard.rringler@xxxxxxxxx> wrote:
>
> access_ok() is used only in user mode and
> branches to .Linvalid_instruction on fault.
> Kernel mode skips access_ok().
>
> Tested-by: Ricky Ringler <richard.rringler@xxxxxxxxx>
>
> Signed-off-by: Ricky Ringler <richard.rringler@xxxxxxxxx>
> ---
> v3:
> - Changed kernel mode behavior to skip access_ok()
>
> v2:
> - Address Max's feedback
> - Fixed formatting
> - Added user mode branch
>
> Testing:
> - Built with CONFIG_MMU enabled
> - objdump before/after comparison and validated code path
>
> arch/xtensa/kernel/align.S | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Thanks. Applied to my xtensa tree.
-- Max