Message ID | 20230206090440.1255001-1-guoren@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 9ddfc3cd806081ce1f6c9c2f988cbb031f35d28f |
Delegated to: | Palmer Dabbelt |
Headers | show |
Series | [RESEND] riscv: jump_label: Fixup unaligned arch_static_branch function | expand |
Context | Check | Description |
---|---|---|
conchuod/cover_letter | success | Single patches do not need cover letters |
conchuod/tree_selection | success | Guessed tree name to be fixes |
conchuod/fixes_present | success | Fixes tag present in non-next series |
conchuod/maintainers_pattern | success | MAINTAINERS pattern errors before the patch: 13 and now 13 |
conchuod/verify_signedoff | success | Signed-off-by tag matches author and committer |
conchuod/kdoc | success | Errors and warnings before: 0 this patch: 0 |
conchuod/build_rv64_clang_allmodconfig | success | Errors and warnings before: 2470 this patch: 2470 |
conchuod/module_param | success | Was 0 now: 0 |
conchuod/build_rv64_gcc_allmodconfig | success | Errors and warnings before: 17334 this patch: 17333 |
conchuod/alphanumeric_selects | success | Out of order selects before the patch: 57 and now 57 |
conchuod/build_rv32_defconfig | success | Build OK |
conchuod/dtb_warn_rv64 | success | Errors and warnings before: 2 this patch: 2 |
conchuod/header_inline | success | No static functions without inline keyword in header files |
conchuod/checkpatch | warning | WARNING: unnecessary whitespace before a quoted newline |
conchuod/source_inline | success | Was 0 now: 0 |
conchuod/build_rv64_nommu_k210_defconfig | success | Build OK |
conchuod/verify_fixes | success | Fixes tag looks correct |
conchuod/build_rv64_nommu_virt_defconfig | success | Build OK |
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <palmer@rivosinc.com>: On Mon, 6 Feb 2023 04:04:40 -0500 you wrote: > From: Andy Chiu <andy.chiu@sifive.com> > > Runtime code patching must be done at a naturally aligned address, or we > may execute on a partial instruction. > > We have encountered problems traced back to static jump functions during > the test. We switched the tracer randomly for every 1~5 seconds on a > dual-core QEMU setup and found the kernel sucking at a static branch > where it jumps to itself. > > [...] Here is the summary with links: - [RESEND] riscv: jump_label: Fixup unaligned arch_static_branch function https://git.kernel.org/riscv/c/9ddfc3cd8060 You are awesome, thank you!
diff --git a/arch/riscv/include/asm/jump_label.h b/arch/riscv/include/asm/jump_label.h index 6d58bbb5da46..14a5ea8d8ef0 100644 --- a/arch/riscv/include/asm/jump_label.h +++ b/arch/riscv/include/asm/jump_label.h @@ -18,6 +18,7 @@ static __always_inline bool arch_static_branch(struct static_key * const key, const bool branch) { asm_volatile_goto( + " .align 2 \n\t" " .option push \n\t" " .option norelax \n\t" " .option norvc \n\t" @@ -39,6 +40,7 @@ static __always_inline bool arch_static_branch_jump(struct static_key * const ke const bool branch) { asm_volatile_goto( + " .align 2 \n\t" " .option push \n\t" " .option norelax \n\t" " .option norvc \n\t"