Skip to content

[PW_SID:1070304] riscv: Check the return value of reloc handlers#1654

Open
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1070304
Open

[PW_SID:1070304] riscv: Check the return value of reloc handlers#1654
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1070304

Conversation

@linux-riscv-bot
Copy link

PR for series 1070304 applied to workflow__riscv__fixes

Name: riscv: Check the return value of reloc handlers
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1070304
Version: 1

Currently, process_accumulated_relocations() ignores the return values
from both reloc_handler() and accumulate_handler().

As a result, the kernel will proceed to load the module with corrupted
or incomplete sections, which can lead to unpredictable behavior or
kernel panics.

So we need to check the return values of the handlers to propagate the
error, and fall back to the cleanup mode.

Fixes: 8fd6c51 ("riscv: Add remaining module relocations")
Signed-off-by: Zishun Yi <vulab@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1111.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1627.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 27.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.43 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.60 seconds
Result: WARNING
Output:

CHECK: Lines should not end with a '('
#51: FILE: arch/riscv/kernel/module.c:642:
+					res = reloc_handlers[curr_type].reloc_handler(

CHECK: Lines should not end with a '('
#61: FILE: arch/riscv/kernel/module.c:650:
+				res = reloc_handlers[curr_type].accumulate_handler(

total: 0 errors, 0 warnings, 2 checks, 57 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 6fa54b122538 ("riscv: Check the return value of reloc handlers") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 2 checks, 57 lines checked
CHECK: Lines should not end with a '('


@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
kdoc
Desc: Detects for kdoc errors
Duration: 0.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Check the return value of reloc handlers"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants