Skip to content
Unverified Commit 6010d300 authored by Akira Tsukamoto's avatar Akira Tsukamoto Committed by Palmer Dabbelt
Browse files

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: default avatarAkira Tsukamoto <akira.tsukamoto@gmail.com>
Fixes: ca6eaaa2 ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall")
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 76f5dfac
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment