diff options
author | Alexandre Ghiti <alexghiti@rivosinc.com> | 2023-12-12 22:54:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-26 02:27:52 +0300 |
commit | b1cc57f976fede33516df78e8bffdee26af017a0 (patch) | |
tree | 857521cce098c34b6c3d45f635cfd7f690845436 /security | |
parent | 9025ee1079291fac79c7fcc20086e9f0015f86f4 (diff) | |
download | linux-b1cc57f976fede33516df78e8bffdee26af017a0.tar.xz |
riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping
commit c29fc621e1a49949a14c7fa031dd4760087bfb29 upstream.
lm_alias() can only be used on kernel mappings since it explicitly uses
__pa_symbol(), so simply fix this by checking where the address belongs
to before.
Fixes: 311cd2f6e253 ("riscv: Fix set_memory_XX() and set_direct_map_XX() by splitting huge linear mappings")
Reported-by: syzbot+afb726d49f84c8d95ee1@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-riscv/000000000000620dd0060c02c5e1@google.com/
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20231212195400.128457-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions