diff options
author | Akira Tsukamoto <akira.tsukamoto@gmail.com> | 2021-07-20 17:50:52 +0900 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-07-23 17:48:52 -0700 |
commit | 6010d300f9f7e16d1bf327b4730bcd0c0886d9e6 (patch) | |
tree | cb9a13e091564601e86ccc04f4e5424a1399cb27 /lib/mpi/mpi-inv.c | |
parent | 76f5dfacfb42b75e5782c017827877cfcee20474 (diff) |
riscv: __asm_copy_to-from_user: Fix: overrun copy
There were two causes for the overrun memory access.
The threshold size was too small.
The aligning dst require one SZREG and unrolling word copy requires
8*SZREG, total have to be at least 9*SZREG.
Inside the unrolling copy, the subtracting -(8*SZREG-1) would make
iteration happening one extra loop. Proper value is -(8*SZREG).
Signed-off-by: Akira Tsukamoto <akira.tsukamoto@gmail.com>
Fixes: ca6eaaa210de ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'lib/mpi/mpi-inv.c')
0 files changed, 0 insertions, 0 deletions