From: sashiko-bot@kernel.org
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v4] bpf: crypto: Use AES-CBC and AES-ECB libraries
Date: Wed, 23 Sep 2026 03:37:42 +0000 [thread overview]
Message-ID: <20260923033742.D45A81F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923032703.59816-1-ebiggers@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] bpf: BPF_CRYPTO is silently disabled if AES libraries are modules
--
commit 1bcee0286f1c7c6c86befd107081ebb8a0fb0eed
Author: Eric Biggers <ebiggers@kernel.org>
bpf: crypto: Use AES-CBC and AES-ECB libraries
This commit reimplements BPF crypto using the AES-CBC and AES-ECB library
APIs instead of the lskcipher API. It adds a new BPF_CRYPTO Kconfig option
to conditionally compile crypto.c based on the new AES library dependencies.
> diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig
> index d7d25477ef481..a44ecfa3e9ef5 100644
> --- a/kernel/bpf/Kconfig
> +++ b/kernel/bpf/Kconfig
> @@ -91,6 +91,15 @@ config BPF_UNPRIV_DEFAULT_OFF
>
> If you are unsure how to answer this question, answer Y.
>
> +config BPF_CRYPTO
> + def_bool y
> + depends on BPF_SYSCALL
> + depends on CRYPTO_LIB_AES_CBC
> + depends on CRYPTO_LIB_AES_ECB
[Severity: High]
Does this dependency logic silently disable BPF_CRYPTO if the AES libraries
are built as modules?
BPF_CRYPTO is defined as a bool in Kconfig but depends on CRYPTO_LIB_AES_CBC
and CRYPTO_LIB_AES_ECB, which are tristate symbols. Under Kconfig rules, when
a bool depends on a tristate that evaluates to m, the dependency evaluates
to m, which downgrades the bool to n.
Consequently, kernel/bpf/crypto.c might not be compiled, and the crypto
kfuncs could be silently stripped from the kernel. Existing BPF programs
using crypto kfuncs will fail to load with "unknown kfunc". Because the AES
library symbols lack user prompts, users cannot manually fix this by
explicitly setting them to =y in menuconfig.
> + help
> + Provide the kfuncs needed for BPF programs to encrypt and decrypt
> + data. The supported algorithms are AES-CBC and AES-ECB.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923032703.59816-1-ebiggers@kernel.org?part=1
next prev parent reply other threads:[~2026-09-23 3:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 3:27 [PATCH bpf-next v4] bpf: crypto: Use AES-CBC and AES-ECB libraries Eric Biggers
2026-09-23 3:37 ` sashiko-bot [this message]
2026-09-23 4:02 ` Alexei Starovoitov
2026-09-23 4:11 ` Eric Biggers
2026-09-23 4:15 ` Alexei Starovoitov
2026-09-23 4:21 ` Eric Biggers
2026-09-23 4:55 ` Alexei Starovoitov
2026-09-23 5:01 ` Eric Biggers
2026-09-24 2:18 ` Alexei Starovoitov
2026-09-23 4:22 ` bot+bpf-ci
2026-09-23 4:55 ` Eric Biggers
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=20260923033742.D45A81F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=ebiggers@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox