mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: hca@linux.ibm.com,stefansf@linux.ibm.com,jchrist@linux.ibm.com,iii@linux.ibm.com,dost@de.ibm.com,agordeev@linux.ibm.com,svens@linux.ibm.com,gor@linux.ibm.com,borntraeger@linux.ibm.com,max@linux.ibm.com,jremus@linux.ibm.com,samitolvanen@google.com,kees@kernel.org,nathan@kernel.org,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com
Cc: llvm@lists.linux.dev,bpf@vger.kernel.org,linux-s390@vger.kernel.org,linux-kernel@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,clm@meta.com,ihor.solodrai@linux.dev
Subject: Re: [PATCH 3/6] s390: Add ftrace_stub_graph
Date: Fri, 24 Jul 2026 15:14:18 +0000 (UTC)	[thread overview]
Message-ID: <28e3e54dc801c37d10bf85fd0c8a8c169d64afc8622cdc8249d970a590b586fd@mail.kernel.org> (raw)
In-Reply-To: <20260724141318.1037434-4-hca@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2088 bytes --]

> diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S
> index 1fec370fecf48..97e9d6bdc0174 100644
> --- a/arch/s390/kernel/mcount.S
> +++ b/arch/s390/kernel/mcount.S
> @@ -4,6 +4,7 @@
>   *
>   */
>
> +#include <linux/cfi_types.h>
>  #include <linux/linkage.h>
>  #include <asm/asm-offsets.h>
>  #include <asm/ftrace.h>

[ ... ]

> @@ -34,10 +35,14 @@
>
>  	.section .kprobes.text, "ax"
>
> -SYM_FUNC_START(ftrace_stub)
> +SYM_TYPED_FUNC_START(ftrace_stub)
>  	BR_EX	%r14
>  SYM_FUNC_END(ftrace_stub)
>
> +SYM_TYPED_FUNC_START(ftrace_stub_graph)
> +	BR_EX	%r14
> +SYM_FUNC_END(ftrace_stub_graph)

Will this link when CONFIG_CFI_CLANG=y and CONFIG_FUNCTION_GRAPH_TRACER=n?

When CFI is enabled, the SYM_TYPED_FUNC_START() macro emits a reference to
__kcfi_typeid_ftrace_stub_graph. However, this symbol is only generated if
ftrace_stub_graph is declared in C code, which only happens when
CONFIG_FUNCTION_GRAPH_TRACER is enabled in kernel/trace/fgraph.c.

Both the RISC-V reference implementation (commit f3a0c23f2539) and the x86
fix (commit aa69f814920d8) wrap ftrace_stub_graph inside:

  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  SYM_TYPED_FUNC_START(ftrace_stub_graph)
  	BR_EX	%r14
  SYM_FUNC_END(ftrace_stub_graph)
  #endif

From commit aa69f814920d8:

  "When CONFIG_FUNCTION_GRAPH_TRACER is disabled,
  __kcfi_typeid_ftrace_stub_graph is missing, causing a link failure:
  ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph
  referenced by arch/x86/kernel/ftrace_64.o:(__cfi_ftrace_stub_graph) in
  archive vmlinux.a"

Should the s390 implementation include the CONFIG_FUNCTION_GRAPH_TRACER
guard?

> +
>  SYM_CODE_START(ftrace_stub_direct_tramp)
>  	lgr	%r1, %r0
>  	BR_EX	%r1

This looks like a bug fix. Should this include:

  Fixes: 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()")


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/30100858043

  reply	other threads:[~2026-07-24 15:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 14:13 [PATCH 0/6] s390: Add kCFI support Heiko Carstens
2026-07-24 14:13 ` [PATCH 1/6] s390/tools: Pass symbol name to do_relocs() Heiko Carstens
2026-07-24 15:14   ` bot+bpf-ci
2026-07-24 14:13 ` [PATCH 2/6] s390/tools/relocs: Ignore __kcfi_typeid_ relocations Heiko Carstens
2026-07-24 14:13 ` [PATCH 3/6] s390: Add ftrace_stub_graph Heiko Carstens
2026-07-24 15:14   ` bot+bpf-ci [this message]
2026-07-24 14:13 ` [PATCH 4/6] s390/diag: Generate CFI type information for assembly functions Heiko Carstens
2026-07-24 14:13 ` [PATCH 5/6] s390/Kconfig: Select ARCH_SUPPORTS_CFI Heiko Carstens
2026-07-25  1:00   ` Nathan Chancellor
2026-07-27 13:52     ` Heiko Carstens
2026-07-24 14:13 ` [PATCH 6/6] s390/bpf: Add kCFI support Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28e3e54dc801c37d10bf85fd0c8a8c169d64afc8622cdc8249d970a590b586fd@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=dost@de.ibm.com \
    --cc=eddyz87@gmail.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=iii@linux.ibm.com \
    --cc=jchrist@linux.ibm.com \
    --cc=jremus@linux.ibm.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.lau@kernel.org \
    --cc=max@linux.ibm.com \
    --cc=memxor@gmail.com \
    --cc=nathan@kernel.org \
    --cc=samitolvanen@google.com \
    --cc=stefansf@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®