[hare-scsi-devel:auth.v2 11/15] drivers/nvme/target/fabrics-cmd-auth.c:111:7: error: implicit declaration of function 'nvmet_auth_ctrl_sesskey'; did you mean 'nvmet_auth_ctrl_hash'?

From: kernel test robot
Date: Thu Aug 05 2021 - 23:20:31 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git auth.v2
head: a9934e3c1c89f0bdcf74245205d986814767ecc1
commit: a876cfbcaec5bcc2f2e0362af0d775c23198896c [11/15] nvmet-auth: Diffie-Hellman key exchange support
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 10.3.0
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=a876cfbcaec5bcc2f2e0362af0d775c23198896c
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 auth.v2
git checkout a876cfbcaec5bcc2f2e0362af0d775c23198896c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

drivers/nvme/target/fabrics-cmd-auth.c: In function 'nvmet_auth_reply':
>> drivers/nvme/target/fabrics-cmd-auth.c:111:7: error: implicit declaration of function 'nvmet_auth_ctrl_sesskey'; did you mean 'nvmet_auth_ctrl_hash'? [-Werror=implicit-function-declaration]
111 | if (nvmet_auth_ctrl_sesskey(req, data->rval + 2 * data->hl,
| ^~~~~~~~~~~~~~~~~~~~~~~
| nvmet_auth_ctrl_hash
drivers/nvme/target/fabrics-cmd-auth.c: In function 'nvmet_auth_challenge':
>> drivers/nvme/target/fabrics-cmd-auth.c:348:9: error: implicit declaration of function 'nvmet_auth_ctrl_exponential' [-Werror=implicit-function-declaration]
348 | ret = nvmet_auth_ctrl_exponential(req, data->cval + data->hl,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
>> drivers/nvme/target/auth.c:378:5: warning: no previous prototype for 'nvmet_auth_ctrl_exponential' [-Wmissing-prototypes]
378 | int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/nvme/target/auth.c:403:5: warning: no previous prototype for 'nvmet_auth_ctrl_sesskey' [-Wmissing-prototypes]
403 | int nvmet_auth_ctrl_sesskey(struct nvmet_req *req,
| ^~~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


vim +111 drivers/nvme/target/fabrics-cmd-auth.c

94
95 static u16 nvmet_auth_reply(struct nvmet_req *req, void *d)
96 {
97 struct nvmet_ctrl *ctrl = req->sq->ctrl;
98 struct nvmf_auth_dhchap_reply_data *data = d;
99 int hash_len = crypto_shash_digestsize(ctrl->shash_tfm);
100 u8 *response;
101
102 pr_debug("%s: ctrl %d qid %d: data hl %d cvalid %d dhvlen %d\n",
103 __func__, ctrl->cntlid, req->sq->qid,
104 data->hl, data->cvalid, data->dhvlen);
105 if (data->hl != hash_len)
106 return NVME_AUTH_DHCHAP_FAILURE_INCORRECT_PAYLOAD;
107
108 if (data->dhvlen) {
109 if (!ctrl->dh_tfm)
110 return NVME_AUTH_DHCHAP_FAILURE_INCORRECT_PAYLOAD;
> 111 if (nvmet_auth_ctrl_sesskey(req, data->rval + 2 * data->hl,
112 data->dhvlen) < 0)
113 return NVME_AUTH_DHCHAP_FAILURE_DHGROUP_UNUSABLE;
114 }
115
116 response = kmalloc(data->hl, GFP_KERNEL);
117 if (!response)
118 return NVME_AUTH_DHCHAP_FAILURE_FAILED;
119
120 if (nvmet_auth_host_hash(req, response, data->hl) < 0) {
121 pr_debug("ctrl %d qid %d DH-HMAC-CHAP hash failed\n",
122 ctrl->cntlid, req->sq->qid);
123 kfree(response);
124 return NVME_AUTH_DHCHAP_FAILURE_FAILED;
125 }
126
127 if (memcmp(data->rval, response, data->hl)) {
128 pr_info("ctrl %d qid %d DH-HMAC-CHAP response mismatch\n",
129 ctrl->cntlid, req->sq->qid);
130 kfree(response);
131 return NVME_AUTH_DHCHAP_FAILURE_FAILED;
132 }
133 kfree(response);
134 pr_info("ctrl %d qid %d DH-HMAC-CHAP host authenticated\n",
135 ctrl->cntlid, req->sq->qid);
136 if (data->cvalid) {
137 req->sq->dhchap_c2 = kmalloc(data->hl, GFP_KERNEL);
138 if (!req->sq->dhchap_c2)
139 return NVME_AUTH_DHCHAP_FAILURE_FAILED;
140 memcpy(req->sq->dhchap_c2, data->rval + data->hl, data->hl);
141
142 pr_debug("ctrl %d qid %d challenge %*ph\n",
143 ctrl->cntlid, req->sq->qid, data->hl,
144 req->sq->dhchap_c2);
145 req->sq->dhchap_s2 = le32_to_cpu(data->seqnum);
146 } else
147 req->sq->dhchap_c2 = NULL;
148
149 return 0;
150 }
151

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip