From: kernel test robot <lkp@intel.com>
To: Vadim Fedorenko <vadfed@meta.com>,
Jakub Kicinski <kuba@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Andrii Nakryiko <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Mykola Lysenko <mykolal@fb.com>
Cc: oe-kbuild-all@lists.linux.dev, Vadim Fedorenko <vadfed@meta.com>,
bpf@vger.kernel.org, netdev@vger.kernel.org,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 1/2] bpf: add skcipher API support to TC/XDP programs
Date: Sat, 28 Oct 2023 08:24:57 +0800 [thread overview]
Message-ID: <202310280854.tycUngCC-lkp@intel.com> (raw)
In-Reply-To: <20231027172039.1365917-1-vadfed@meta.com>
Hi Vadim,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Vadim-Fedorenko/selftests-bpf-crypto-skcipher-algo-selftests/20231028-020332
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20231027172039.1365917-1-vadfed%40meta.com
patch subject: [PATCH bpf-next v2 1/2] bpf: add skcipher API support to TC/XDP programs
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20231028/202310280854.tycUngCC-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231028/202310280854.tycUngCC-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310280854.tycUngCC-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/bpf/crypto.c:74: warning: Function parameter or member 'palgo' not described in 'bpf_crypto_skcipher_ctx_create'
>> kernel/bpf/crypto.c:74: warning: Function parameter or member 'pkey' not described in 'bpf_crypto_skcipher_ctx_create'
>> kernel/bpf/crypto.c:74: warning: Function parameter or member 'err' not described in 'bpf_crypto_skcipher_ctx_create'
>> kernel/bpf/crypto.c:74: warning: Excess function parameter 'algo' description in 'bpf_crypto_skcipher_ctx_create'
>> kernel/bpf/crypto.c:74: warning: Excess function parameter 'key' description in 'bpf_crypto_skcipher_ctx_create'
vim +74 kernel/bpf/crypto.c
58
59 /**
60 * bpf_crypto_skcipher_ctx_create() - Create a mutable BPF crypto context.
61 *
62 * Allocates a crypto context that can be used, acquired, and released by
63 * a BPF program. The crypto context returned by this function must either
64 * be embedded in a map as a kptr, or freed with bpf_crypto_skcipher_ctx_release().
65 *
66 * bpf_crypto_skcipher_ctx_create() allocates memory using the BPF memory
67 * allocator, and will not block. It may return NULL if no memory is available.
68 * @algo: bpf_dynptr which holds string representation of algorithm.
69 * @key: bpf_dynptr which holds cipher key to do crypto.
70 */
71 __bpf_kfunc struct bpf_crypto_skcipher_ctx *
72 bpf_crypto_skcipher_ctx_create(const struct bpf_dynptr_kern *palgo,
73 const struct bpf_dynptr_kern *pkey, int *err)
> 74 {
75 struct bpf_crypto_skcipher_ctx *ctx;
76 char *algo;
77
78 if (__bpf_dynptr_size(palgo) > CRYPTO_MAX_ALG_NAME) {
79 *err = -EINVAL;
80 return NULL;
81 }
82
83 algo = __bpf_dynptr_data_ptr(palgo);
84
85 if (!crypto_has_skcipher(algo, CRYPTO_ALG_TYPE_SKCIPHER, CRYPTO_ALG_TYPE_MASK)) {
86 *err = -EOPNOTSUPP;
87 return NULL;
88 }
89
90 ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
91 if (!ctx) {
92 *err = -ENOMEM;
93 return NULL;
94 }
95
96 memset(ctx, 0, sizeof(*ctx));
97
98 ctx->tfm = crypto_alloc_sync_skcipher(algo, 0, 0);
99 if (IS_ERR(ctx->tfm)) {
100 *err = PTR_ERR(ctx->tfm);
101 ctx->tfm = NULL;
102 goto err;
103 }
104
105 *err = crypto_sync_skcipher_setkey(ctx->tfm, __bpf_dynptr_data_ptr(pkey),
106 __bpf_dynptr_size(pkey));
107 if (*err)
108 goto err;
109
110 refcount_set(&ctx->usage, 1);
111
112 return ctx;
113 err:
114 if (ctx->tfm)
115 crypto_free_sync_skcipher(ctx->tfm);
116 kfree(ctx);
117
118 return NULL;
119 }
120
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-10-28 0:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 17:20 [PATCH bpf-next v2 1/2] bpf: add skcipher API support to TC/XDP programs Vadim Fedorenko
2023-10-27 17:20 ` [PATCH bpf-next v2 2/2] selftests: bpf: crypto skcipher algo selftests Vadim Fedorenko
2023-10-28 0:24 ` kernel test robot [this message]
2023-10-29 9:32 ` [PATCH bpf-next v2 1/2] bpf: add skcipher API support to TC/XDP programs kernel test robot
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=202310280854.tycUngCC-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=vadfed@meta.com \
/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;
as well as URLs for NNTP newsgroup(s).