[PW_SID:970276] Fix a segmentation fault also add raid6test for RISC-V support#497
[PW_SID:970276] Fix a segmentation fault also add raid6test for RISC-V support#497linux-riscv-bot wants to merge 5 commits into
Conversation
These two C files don't reference things defined in simd.h or types.h so remove these redundant #inclusions. Fixes: 6093faa ("raid6: Add RISC-V SIMD syndrome and recovery calculations") Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
When running the raid6 user-space test program on RISC-V QEMU, there's a segmentation fault which seems caused by accessing a NULL pointer, which is the pointer variable p/q in raid6_rvv*_gen/xor_syndrome_real(), p/q should have been equal to dptr[x], but when I use GDB command to see its value, which was 0x10 like below: " Program received signal SIGSEGV, Segmentation fault. 0x0000000000011062 in raid6_rvv2_xor_syndrome_real (disks=<optimized out>, start=0, stop=<optimized out>, bytes=4096, ptrs=<optimized out>) at rvv.c:386 (gdb) p p $1 = (u8 *) 0x10 <error: Cannot access memory at address 0x10> " The issue was found to be related with: 1) Compile optimization There's no segmentation fault if compiling the raid6test program with the optimization flag -O0. 2) The RISC-V vector command vsetvli If not used t0 as the first parameter in vsetvli, there's no segmentation fault either. This patch selects the 2nd solution to fix the issue. Fixes: 6093faa ("raid6: Add RISC-V SIMD syndrome and recovery calculations") Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
To support userspace raid6test, this patch adds __KERNEL__ ifdef for kernel header inclusions also userspace wrapper definitions to allow code to be compiled in userspace. Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add RISC-V code to be compiled to allow the userspace raid6test program to be built and run on RISC-V. Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 1: "[1/4] raid6: riscv: Clean up unused header file inclusion" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 2: "[2/4] raid6: riscv: Fix NULL pointer dereference issue" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 3: "[3/4] raid6: riscv: Allow code to be compiled in userspace" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
|
Patch 4: "[4/4] raid6: test: Add support for RISC-V" |
e678629 to
7991a94
Compare
PR for series 970276 applied to workflow__riscv__for-next
Name: Fix a segmentation fault also add raid6test for RISC-V support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=970276
Version: 1