From: sashiko-bot@kernel.org
To: "Heiko Carstens" <hca@linux.ibm.com>
Cc: "Vasily Gorbik" <gor@linux.ibm.com>,
bpf@vger.kernel.org, linux-s390@vger.kernel.org,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>
Subject: Re: [PATCH 5/6] s390/Kconfig: Select ARCH_SUPPORTS_CFI
Date: Fri, 24 Jul 2026 14:37:32 +0000 [thread overview]
Message-ID: <20260724143732.8813C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724141318.1037434-6-hca@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing CFI type hashes in s390 BPF JIT causes kernel panics on valid BPF callbacks.
- [Medium] Enabling ARCH_SUPPORTS_CFI on s390 breaks the semantic contract of CFI_PERMISSIVE, causing kernel panics instead of warnings.
--
--- Patch [5]: [PATCH 5/6] s390/Kconfig: Select ARCH_SUPPORTS_CFI ---
commit 331ca22524bf97cd2604c69fc257401120f48c71
Author: Heiko Carstens <hca@linux.ibm.com>
s390/Kconfig: Select ARCH_SUPPORTS_CFI
This commit selects ARCH_SUPPORTS_CFI for s390 to enable KCFI support. It
notes that without a .kcfi_traps section, CFI mismatches will result in
kernel crashes instead of warnings, even in permissive mode.
> In addition this also means that CFI_PERMISSIVE does not work. Even if the
> option is selected the kernel will crash in case of checksum mismatch.
[Severity: Medium]
Since enabling this feature on s390 breaks the expected semantic contract
of CFI_PERMISSIVE defined in arch/Kconfig, should we actively prevent users
from selecting permissive mode on s390?
Currently, a user configuring CONFIG_CFI and CONFIG_CFI_PERMISSIVE would
expect a warning on a mismatch, but will experience a hard panic instead.
Would it be better to add a dependency restricting CFI_PERMISSIVE so it
cannot be selected when the architecture lacks trap interception?
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index 84404e6778d50..d57a6c02f51d2 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -144,6 +144,7 @@ config S390
> select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
> select ARCH_STACKWALK
> select ARCH_SUPPORTS_ATOMIC_RMW
> + select ARCH_SUPPORTS_CFI
[Severity: High]
Does the s390 BPF JIT implementation currently generate the required CFI type
hashes?
Looking at bpf_int_jit_compile() in arch/s390/net/bpf_jit_comp.c, if the
JIT does not yet emit the cfi_bpf_hash preceding the generated code, will
valid BPF subprogram callbacks (like bpf_task_work_callback or timers)
trigger a KCFI mismatch and crash the host?
> select ARCH_SUPPORTS_DEBUG_PAGEALLOC
> select ARCH_SUPPORTS_HUGETLBFS
> select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && CC_IS_CLANG
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724141318.1037434-1-hca@linux.ibm.com?part=5
next prev parent reply other threads:[~2026-07-24 14:37 UTC|newest]
Thread overview: 16+ 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 14:23 ` sashiko-bot
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:30 ` sashiko-bot
2026-07-24 14:13 ` [PATCH 3/6] s390: Add ftrace_stub_graph Heiko Carstens
2026-07-24 14:21 ` sashiko-bot
2026-07-24 15:14 ` bot+bpf-ci
2026-07-24 14:13 ` [PATCH 4/6] s390/diag: Generate CFI type information for assembly functions Heiko Carstens
2026-07-24 14:26 ` sashiko-bot
2026-07-24 14:13 ` [PATCH 5/6] s390/Kconfig: Select ARCH_SUPPORTS_CFI Heiko Carstens
2026-07-24 14:37 ` sashiko-bot [this message]
2026-07-25 1:00 ` Nathan Chancellor
2026-07-24 14:13 ` [PATCH 6/6] s390/bpf: Add kCFI support Heiko Carstens
2026-07-24 14:34 ` sashiko-bot
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=20260724143732.8813C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.