Skip to content

[PW_SID:1077845] riscv: Define __riscv_copy_{,vec_}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START#1729

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1077845
Closed

[PW_SID:1077845] riscv: Define __riscv_copy_{,vec_}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START#1729
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1077845

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1077845 applied to workflow__riscv__fixes

Name: riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1077845
Version: 1

…_TYPED_FUNC_START

After commit 67bdd7b ("riscv: Split out measure_cycles() for
reuse") and commit c03ad15 ("riscv: Reuse measure_cycles() in
check_vector_unaligned_access()"), there are CFI failure when booting
kernels with CONFIG_CFI=y:

  CFI failure at measure_cycles+0x38/0xe0 (target: __riscv_copy_words_unaligned+0x0/0x50; expected type: ...)
  CFI failure at measure_cycles+0x38/0xe0 (target: __riscv_copy_vec_words_unaligned+0x0/0x24; expected type: ...)

The __riscv_copy_*_unaligned() functions are now called indirectly but
they are not defined with SYM_TYPED_FUNC_START, which is required for
assembly functions called indirectly from C to pass CFI checking. Switch
to SYM_TYPED_FUNC_START to clear up the CFI failures.

Fixes: 67bdd7b ("riscv: Split out measure_cycles() for reuse")
Fixes: c03ad15 ("riscv: Reuse measure_cycles() in check_vector_unaligned_access()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 136.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 921.37 seconds
Result: ERROR
Output:

Redirect to /build/tmp.WtNuZjgRfn and /build/tmp.ifkivA3LDq
Tree base:
506e7f67b3724 ("Adding CI files")
Building the whole tree with the patch
error:
Warning: /build/tmpsragv6n2/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c:244 struct __packed mtk_mfg_opp_entry { __le32 freq_khz; __le32 voltage_core; __le32 voltage_sram; __le32 posdiv; __le32 voltage_margin; __le32 power_mw; }; error: Cannot parse struct or union!
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_bytes_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_words_unaligned'; recompile with -fPIC
ld.lld: error: relocation R_RISCV_32 cannot be used against symbol '__kcfi_typeid___riscv_copy_vec_bytes_unaligned'; recompile with -fPIC



real	15m12.902s
user	565m3.590s
sys	105m58.582s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1598.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.19 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.35 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
kdoc
Desc: Detects for kdoc errors
Duration: 0.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Define riscv_copy{,vec}{words,bytes}_unaligned() using SYM_TYPED_FUNC_START"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1077845 branch April 14, 2026 00:12
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