diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-20 09:16:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-20 09:16:09 -0800 |
| commit | 9abf79529f4c4bc43464dcb82bfcc16297f90cc6 (patch) | |
| tree | d4148aac086303bfebd786723e407716d5cb0f2e /arch | |
| parent | c8cb804a8add8d6f41b3805441b2ad16e30fbcc0 (diff) | |
| parent | 0d4b3ca115b5436d7e68453527566db3e87ab7f0 (diff) | |
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
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/xtensa/kernel/align.S | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index ee97edce2300..f2d0d831ce43 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S @@ -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 |
