lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <202310280854.tycUngCC-lkp@intel.com> Date: Sat, 28 Oct 2023 08:24:57 +0800 From: kernel test robot <lkp@...el.com> To: Vadim Fedorenko <vadfed@...a.com>, Jakub Kicinski <kuba@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, Andrii Nakryiko <andrii@...nel.org>, Alexei Starovoitov <ast@...nel.org>, Mykola Lysenko <mykolal@...com> Cc: oe-kbuild-all@...ts.linux.dev, Vadim Fedorenko <vadfed@...a.com>, bpf@...r.kernel.org, netdev@...r.kernel.org, linux-crypto@...r.kernel.org Subject: Re: [PATCH bpf-next v2 1/2] bpf: add skcipher API support to TC/XDP programs 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@...el.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
Powered by blists - more mailing lists