[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203132236.VeI6E96J-lkp@intel.com>
Date: Sun, 13 Mar 2022 22:24:44 +0800
From: kernel test robot <lkp@...el.com>
To: Hannes Reinecke <hare@...e.de>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [hare-scsi-devel:tls-upcall.v4 118/156] crypto/hkdf.c:26:5: warning:
no previous prototype for function 'hkdf_extract'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git tls-upcall.v4
head: d2416ecdb6b03fc2e4aa40b20cdf919322713224
commit: ea4c6fc32e5e02a1e4c841f462c3a931b8838f33 [118/156] crypto,fs: Separate out hkdf_extract() and hkdf_expand()
config: hexagon-randconfig-r045-20220313 (https://download.01.org/0day-ci/archive/20220313/202203132236.VeI6E96J-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0467eb2cb7654c15ae366967ef35093c5724c416)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=ea4c6fc32e5e02a1e4c841f462c3a931b8838f33
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel tls-upcall.v4
git checkout ea4c6fc32e5e02a1e4c841f462c3a931b8838f33
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> crypto/hkdf.c:26:5: warning: no previous prototype for function 'hkdf_extract' [-Wmissing-prototypes]
int hkdf_extract(struct crypto_shash *hmac_tfm, const u8 *ikm,
^
crypto/hkdf.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int hkdf_extract(struct crypto_shash *hmac_tfm, const u8 *ikm,
^
static
>> crypto/hkdf.c:52:5: warning: no previous prototype for function 'hkdf_expand' [-Wmissing-prototypes]
int hkdf_expand(struct crypto_shash *hmac_tfm,
^
crypto/hkdf.c:52:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int hkdf_expand(struct crypto_shash *hmac_tfm,
^
static
2 warnings generated.
vim +/hkdf_extract +26 crypto/hkdf.c
14
15 /*
16 * HKDF consists of two steps:
17 *
18 * 1. HKDF-Extract: extract a pseudorandom key of length HKDF_HASHLEN bytes from
19 * the input keying material and optional salt.
20 * 2. HKDF-Expand: expand the pseudorandom key into output keying material of
21 * any length, parameterized by an application-specific info string.
22 *
23 */
24
25 /* HKDF-Extract (RFC 5869 section 2.2), unsalted */
> 26 int hkdf_extract(struct crypto_shash *hmac_tfm, const u8 *ikm,
27 unsigned int ikmlen, u8 *prk)
28 {
29 unsigned int prklen = crypto_shash_digestsize(hmac_tfm);
30 u8 *default_salt;
31 int err;
32
33 default_salt = kzalloc(prklen, GFP_KERNEL);
34 if (!default_salt)
35 return -ENOMEM;
36 err = crypto_shash_setkey(hmac_tfm, default_salt, prklen);
37 if (!err)
38 err = crypto_shash_tfm_digest(hmac_tfm, ikm, ikmlen, prk);
39
40 kfree(default_salt);
41 return err;
42 }
43 EXPORT_SYMBOL_GPL(hkdf_extract);
44
45 /*
46 * HKDF-Expand (RFC 5869 section 2.3).
47 * This expands the pseudorandom key, which was already keyed into @hmac_tfm,
48 * into @okmlen bytes of output keying material parameterized by the
49 * application-specific @info of length @infolen bytes.
50 * This is thread-safe and may be called by multiple threads in parallel.
51 */
> 52 int hkdf_expand(struct crypto_shash *hmac_tfm,
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists