From: kernel test robot <lkp@intel.com>
To: Vadim Fedorenko <vadfed@meta.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
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>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
linux-crypto@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v6 1/3] bpf: make common crypto API for TC/XDP programs
Date: Thu, 30 Nov 2023 11:54:43 +0800 [thread overview]
Message-ID: <202311300742.fDSG2vce-lkp@intel.com> (raw)
In-Reply-To: <20231129173312.31008-1-vadfed@meta.com>
Hi Vadim,
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Vadim-Fedorenko/bpf-crypto-add-skcipher-to-bpf-crypto/20231130-014813
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20231129173312.31008-1-vadfed%40meta.com
patch subject: [PATCH bpf-next v6 1/3] bpf: make common crypto API for TC/XDP programs
config: arm64-randconfig-r081-20231130 (https://download.01.org/0day-ci/archive/20231130/202311300742.fDSG2vce-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311300742.fDSG2vce-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/202311300742.fDSG2vce-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/bpf/crypto.c:179:46: error: expected ')'
179 | *err = type->setauthsize(ctx->tfm, authsize;
| ^
kernel/bpf/crypto.c:179:27: note: to match this '('
179 | *err = type->setauthsize(ctx->tfm, authsize;
| ^
1 error generated.
vim +179 kernel/bpf/crypto.c
105
106 /**
107 * bpf_crypto_ctx_create() - Create a mutable BPF crypto context.
108 *
109 * Allocates a crypto context that can be used, acquired, and released by
110 * a BPF program. The crypto context returned by this function must either
111 * be embedded in a map as a kptr, or freed with bpf_crypto_ctx_release().
112 * As crypto API functions use GFP_KERNEL allocations, this function can
113 * only be used in sleepable BPF programs.
114 *
115 * bpf_crypto_ctx_create() allocates memory for crypto context.
116 * It may return NULL if no memory is available.
117 * @type__str: pointer to string representation of crypto type.
118 * @algo__str: pointer to string representation of algorithm.
119 * @pkey: bpf_dynptr which holds cipher key to do crypto.
120 * @err: integer to store error code when NULL is returned
121 */
122 __bpf_kfunc struct bpf_crypto_ctx *
123 bpf_crypto_ctx_create(const char *type__str, const char *algo__str,
124 const struct bpf_dynptr_kern *pkey,
125 unsigned int authsize, int *err)
126 {
127 const struct bpf_crypto_type *type = bpf_crypto_get_type(type__str);
128 struct bpf_crypto_ctx *ctx;
129 const u8 *key;
130 u32 key_len;
131
132 //type = bpf_crypto_get_type(type__str);
133 if (IS_ERR(type)) {
134 *err = PTR_ERR(type);
135 return NULL;
136 }
137
138 if (!type->has_algo(algo__str)) {
139 *err = -EOPNOTSUPP;
140 goto err;
141 }
142
143 if (!authsize && type->setauthsize) {
144 *err = -EOPNOTSUPP;
145 goto err;
146 }
147
148 if (authsize && !type->setauthsize) {
149 *err = -EOPNOTSUPP;
150 goto err;
151 }
152
153 key_len = __bpf_dynptr_size(pkey);
154 if (!key_len) {
155 *err = -EINVAL;
156 goto err;
157 }
158 key = __bpf_dynptr_data(pkey, key_len);
159 if (!key) {
160 *err = -EINVAL;
161 goto err;
162 }
163
164 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
165 if (!ctx) {
166 *err = -ENOMEM;
167 goto err;
168 }
169
170 ctx->type = type;
171 ctx->tfm = type->alloc_tfm(algo__str);
172 if (IS_ERR(ctx->tfm)) {
173 *err = PTR_ERR(ctx->tfm);
174 ctx->tfm = NULL;
175 goto err;
176 }
177
178 if (authsize) {
> 179 *err = type->setauthsize(ctx->tfm, authsize;
180 if (*err)
181 goto err;
182 }
183
184 *err = type->setkey(ctx->tfm, key, key_len);
185 if (*err)
186 goto err;
187
188 refcount_set(&ctx->usage, 1);
189
190 return ctx;
191 err:
192 if (ctx->tfm)
193 type->free_tfm(ctx->tfm);
194 kfree(ctx);
195 module_put(type->owner);
196
197 return NULL;
198 }
199
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-11-30 3:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 17:33 [PATCH bpf-next v6 1/3] bpf: make common crypto API for TC/XDP programs Vadim Fedorenko
2023-11-29 17:33 ` [PATCH bpf-next v6 2/3] bpf: crypto: add skcipher to bpf crypto Vadim Fedorenko
2023-11-30 2:11 ` Herbert Xu
2023-11-29 17:33 ` [PATCH bpf-next v6 3/3] selftests: bpf: crypto skcipher algo selftests Vadim Fedorenko
2023-11-29 21:46 ` [PATCH bpf-next v6 1/3] bpf: make common crypto API for TC/XDP programs Stanislav Fomichev
2023-11-29 21:53 ` Vadim Fedorenko
2023-11-30 3:54 ` kernel test robot [this message]
2023-11-30 3:54 ` 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=202311300742.fDSG2vce-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--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 \
--cc=vadim.fedorenko@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.