Skip to content

[PW_SID:1122351] riscv: ftrace: only use pre-function NOPs with call ops#2226

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1122351
Closed

[PW_SID:1122351] riscv: ftrace: only use pre-function NOPs with call ops#2226
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1122351

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1122351 applied to workflow__riscv__fixes

Name: riscv: ftrace: only use pre-function NOPs with call ops
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1122351
Version: 1

Linux RISC-V bot and others added 2 commits July 1, 2026 03:48
Commit c217157 ("riscv: Implement
HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS") changed CC_FLAGS_FTRACE to use
-fpatchable-function-entry=8,4 or -fpatchable-function-entry=4,2
for all dynamic ftrace builds. That layout makes the compiler place an
8-byte area before the function entry, which is used as the per-callsite
ftrace_ops literal when CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS is enabled.

RISC-V can still build with CONFIG_DYNAMIC_FTRACE=y and
CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS=n, for example when
CONFIG_CFI_CLANG is enabled because HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
is selected only when !CFI_CLANG. In that configuration
ftrace_call_adjust() does not skip the pre-function literal area and
only returns addr + MCOUNT_AUIPC_SIZE. With the pre-function layout,
that points into the pre-entry padding instead of the callsite jalr, so
dynamic ftrace records the wrong patch address.

Use the pre-function literal layout only when call ops are enabled.
Otherwise keep the previous patchable-function-entry counts so the
recorded address matches ftrace_call_adjust() non-call-ops path.

Fixes: c217157 ("riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS")
Cc: stable@vger.kernel.org
Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 144.56 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2548.99 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1393.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 27.93 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 29.42 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 85.42 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: ftrace: only use pre-function NOPs with call ops"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.33 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 7 times, most recently from 869345e to f54dc6c Compare July 13, 2026 20:05
@linux-riscv-bot
linux-riscv-bot deleted the pw1122351 branch July 14, 2026 01:36
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