Skip to content

[PW_SID:1070655] [v2] riscv: cif: clear CFI lock status in start_thread#1658

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

[PW_SID:1070655] [v2] riscv: cif: clear CFI lock status in start_thread#1658
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1070655

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1070655 applied to workflow__riscv__fixes

Name: [v2] riscv: cif: clear CFI lock status in start_thread
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1070655
Version: 2

When libc locks the CFI status through the following prctl:
 - PR_LOCK_SHADOW_STACK_STATUS
 - PR_LOCK_INDIR_BR_LP_STATUS

A newly execd address space will inherit the lock status
if it does not clear the lock bits. Since the lock bits
remain set, libc will later fail to enable the landing
pad and shadow stack.

Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.45 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1799.06 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2314.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 27.04 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.09 seconds
Result: WARNING
Output:

WARNING: Argument 'task' is not used in function-like macro
#50: FILE: arch/riscv/include/asm/usercfi.h:72:
+#define set_shstk_lock(task, lock) do {} while (0)

WARNING: Argument 'lock' is not used in function-like macro
#50: FILE: arch/riscv/include/asm/usercfi.h:72:
+#define set_shstk_lock(task, lock) do {} while (0)

WARNING: Argument 'task' is not used in function-like macro
#59: FILE: arch/riscv/include/asm/usercfi.h:82:
+#define set_indir_lp_lock(task, lock) do {} while (0)

WARNING: Argument 'lock' is not used in function-like macro
#59: FILE: arch/riscv/include/asm/usercfi.h:82:
+#define set_indir_lp_lock(task, lock) do {} while (0)

total: 0 errors, 4 warnings, 0 checks, 83 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 c0160dffe9a7 ("riscv: cif: clear CFI lock status in start_thread") 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, 4 warnings, 0 checks, 83 lines checked
WARNING: Argument 'lock' is not used in function-like macro
WARNING: Argument 'task' is not used in function-like macro


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.16 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
kdoc
Desc: Detects for kdoc errors
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2] riscv: cif: clear CFI lock status in start_thread"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1070655 branch March 23, 2026 23:37
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