> Add enum bpf_crypto_type_id for runtime type checking to ensure
> operations are performed on the correct crypto context type. The enum
> values are assigned to all crypto type modules (skcipher, hash, sig).

This paragraph appears to be inaccurate. The enum bpf_crypto_type_id and
all three values (BPF_CRYPTO_TYPE_SKCIPHER, BPF_CRYPTO_TYPE_HASH,
BPF_CRYPTO_TYPE_SIG) were added in the earlier commit ddee9f01e40e
("bpf: Add hash kfunc for cryptographic hashing"), along with the
type_id field in struct bpf_crypto_type and the assignment to the
skcipher module.

Should this paragraph be removed or reworded to reflect what this
commit actually introduces?

> diff --git a/kernel/bpf/crypto.c b/kernel/bpf/crypto.c
> --- a/kernel/bpf/crypto.c
> +++ b/kernel/bpf/crypto.c

[ ... ]

> @@ -438,6 +549,12 @@ __bpf_kfunc int bpf_sig_maxsize(struct bpf_crypto_ctx 
> *ctx)
>  #if IS_ENABLED(CONFIG_CRYPTO_HASH2)
>  BTF_ID_FLAGS(func, bpf_crypto_hash, KF_RCU)
>  #endif
> +#if IS_ENABLED(CONFIG_CRYPTO_SIG2)
> +BTF_ID_FLAGS(func, bpf_sig_verify, KF_RCU)
> +BTF_ID_FLAGS(func, bpf_sig_keysize)
> +BTF_ID_FLAGS(func, bpf_sig_digestsize)
> +BTF_ID_FLAGS(func, bpf_sig_maxsize)
> +#endif

This isn't a bug, but the existing kfuncs in this file follow the
bpf_crypto_ naming convention: bpf_crypto_encrypt, bpf_crypto_decrypt,
bpf_crypto_hash. The new kfuncs use bpf_sig_ instead. Would
bpf_crypto_sig_verify (and similar) be more consistent for API
discoverability?


---
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/22414975518

AI-authorship-score: medium
AI-authorship-explanation: Formulaic boilerplate code and polished commit 
message suggest possible AI assistance, but iterative v1-v8 development with 
lore interaction and a human-like commit message inaccuracy pattern indicate 
primarily human authorship.
issues-found: 2
issue-severity-score: low
issue-severity-explanation: Commit message inaccuracy about enum addition and 
kfunc naming inconsistency are documentation and style issues with no runtime 
impact.

Reply via email to