Commit 9abf7952 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xtensa-20260219' of https://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa update from Max Filippov:

 - fix unhandled case in the load/store fault handler
   in configurations with MMU

* tag 'xtensa-20260219' of https://github.com/jcmvbkbc/linux-xtensa:
  xtensa: align: validate access in fast_load_store
parents c8cb804a 0d4b3ca1
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@
#include <asm/asm-offsets.h>
#include <asm/asmmacro.h>
#include <asm/processor.h>
#ifdef CONFIG_MMU
#include <asm/asm-uaccess.h>
#endif

#if XCHAL_UNALIGNED_LOAD_EXCEPTION || defined CONFIG_XTENSA_LOAD_STORE
#define LOAD_EXCEPTION_HANDLER
@@ -185,8 +188,11 @@ ENTRY(fast_load_store)

#ifdef CONFIG_MMU
	/* l32e can't be used here even when it's available. */
	/* TODO access_ok(a3) could be used here */
	j	.Linvalid_instruction
	rsr	a6, ps
	bbci.l	a6, PS_UM_BIT, 1f # kernel mode
	movi	a5, 8
	access_ok a3, a5, a6, a2, .Linvalid_instruction
1:
#endif
	l32i	a5, a3, 0
	l32i	a6, a3, 4