Lines Matching full:d
20 pr_debug("%s: ctrl %d qid %d transaction %u expired, resetting\n", in nvmet_auth_expired_work()
34 static u8 nvmet_auth_negotiate(struct nvmet_req *req, void *d) in nvmet_auth_negotiate() argument
37 struct nvmf_auth_dhchap_negotiate_data *data = d; in nvmet_auth_negotiate()
40 pr_debug("%s: ctrl %d qid %d: data sc_d %d napd %d authid %d halen %d dhlen %d\n", in nvmet_auth_negotiate()
88 pr_debug("%s: ctrl %d qid %d: no usable hash found\n", in nvmet_auth_negotiate()
92 pr_debug("%s: ctrl %d qid %d: no usable hash found, falling back to %s\n", in nvmet_auth_negotiate()
116 pr_debug("%s: ctrl %d qid %d: no usable DH group found\n", in nvmet_auth_negotiate()
120 pr_debug("%s: ctrl %d qid %d: configured DH group %s not found\n", in nvmet_auth_negotiate()
126 pr_debug("%s: ctrl %d qid %d: NULL DH group invalid " in nvmet_auth_negotiate()
131 pr_debug("%s: ctrl %d qid %d: selected DH group %s (%d)\n", in nvmet_auth_negotiate()
137 static u8 nvmet_auth_reply(struct nvmet_req *req, void *d) in nvmet_auth_reply() argument
140 struct nvmf_auth_dhchap_reply_data *data = d; in nvmet_auth_reply()
144 pr_debug("%s: ctrl %d qid %d: data hl %d cvalid %d dhvlen %u\n", in nvmet_auth_reply()
161 pr_warn("ctrl %d qid %d no host key\n", in nvmet_auth_reply()
167 pr_debug("ctrl %d qid %d host hash failed\n", in nvmet_auth_reply()
174 pr_info("ctrl %d qid %d host response mismatch\n", in nvmet_auth_reply()
176 pr_debug("ctrl %d qid %d rval %*ph\n", in nvmet_auth_reply()
178 pr_debug("ctrl %d qid %d response %*ph\n", in nvmet_auth_reply()
184 pr_debug("%s: ctrl %d qid %d host authenticated\n", in nvmet_auth_reply()
187 pr_debug("%s: ctrl %d qid %d invalid challenge\n", in nvmet_auth_reply()
198 pr_debug("%s: ctrl %d qid %d challenge %*ph\n", in nvmet_auth_reply()
222 static u8 nvmet_auth_failure2(void *d) in nvmet_auth_failure2() argument
224 struct nvmf_auth_dhchap_failure_data *data = d; in nvmet_auth_failure2()
238 void *d; in nvmet_execute_auth_send() local
273 d = kmalloc(tl, GFP_KERNEL); in nvmet_execute_auth_send()
274 if (!d) { in nvmet_execute_auth_send()
279 status = nvmet_copy_from_sgl(req, 0, d, tl); in nvmet_execute_auth_send()
283 data = d; in nvmet_execute_auth_send()
284 pr_debug("%s: ctrl %d qid %d type %d id %d step %x\n", __func__, in nvmet_execute_auth_send()
293 pr_debug("%s: ctrl %d qid %d reset negotiation\n", in nvmet_execute_auth_send()
298 pr_err("ctrl %d qid 0 failed to setup re-authentication\n", in nvmet_execute_auth_send()
311 dhchap_status = nvmet_auth_negotiate(req, d); in nvmet_execute_auth_send()
323 pr_debug("%s: ctrl %d qid %d step mismatch (%d != %d)\n", in nvmet_execute_auth_send()
329 pr_debug("%s: ctrl %d qid %d invalid transaction %d (expected %d)\n", in nvmet_execute_auth_send()
342 dhchap_status = nvmet_auth_reply(req, d); in nvmet_execute_auth_send()
356 pr_debug("%s: ctrl %d qid %d ctrl authenticated\n", in nvmet_execute_auth_send()
360 dhchap_status = nvmet_auth_failure2(d); in nvmet_execute_auth_send()
362 pr_warn("ctrl %d qid %d: authentication failed (%d)\n", in nvmet_execute_auth_send()
381 kfree(d); in nvmet_execute_auth_send()
383 pr_debug("%s: ctrl %d qid %d dhchap status %x step %x\n", __func__, in nvmet_execute_auth_send()
387 pr_debug("%s: ctrl %d qid %d nvme status %x error loc %d\n", in nvmet_execute_auth_send()
407 static int nvmet_auth_challenge(struct nvmet_req *req, void *d, int al) in nvmet_auth_challenge() argument
409 struct nvmf_auth_dhchap_challenge_data *data = d; in nvmet_auth_challenge()
413 int data_size = sizeof(*d) + hash_len; in nvmet_auth_challenge()
418 pr_debug("%s: buffer too small (al %d need %d)\n", __func__, in nvmet_auth_challenge()
441 pr_debug("%s: ctrl %d qid %d seq %d transaction %d hl %d dhvlen %zu\n", in nvmet_auth_challenge()
447 static int nvmet_auth_success1(struct nvmet_req *req, void *d, int al) in nvmet_auth_success1() argument
449 struct nvmf_auth_dhchap_success1_data *data = d; in nvmet_auth_success1()
461 pr_warn("ctrl %d qid %d no ctrl key\n", in nvmet_auth_success1()
468 pr_debug("ctrl %d qid %d response %*ph\n", in nvmet_auth_success1()
474 static void nvmet_auth_failure1(struct nvmet_req *req, void *d, int al) in nvmet_auth_failure1() argument
476 struct nvmf_auth_dhchap_failure_data *data = d; in nvmet_auth_failure1()
494 void *d; in nvmet_execute_auth_receive() local
528 d = kmalloc(al, GFP_KERNEL); in nvmet_execute_auth_receive()
529 if (!d) { in nvmet_execute_auth_receive()
533 pr_debug("%s: ctrl %d qid %d step %x\n", __func__, in nvmet_execute_auth_receive()
537 if (nvmet_auth_challenge(req, d, al) < 0) { in nvmet_execute_auth_receive()
538 pr_warn("ctrl %d qid %d: challenge error (%d)\n", in nvmet_execute_auth_receive()
546 status = nvmet_auth_success1(req, d, al); in nvmet_execute_auth_receive()
550 nvmet_auth_failure1(req, d, al); in nvmet_execute_auth_receive()
551 pr_warn("ctrl %d qid %d: success1 status (%x)\n", in nvmet_execute_auth_receive()
560 nvmet_auth_failure1(req, d, al); in nvmet_execute_auth_receive()
561 pr_warn("ctrl %d qid %d failure1 (%x)\n", in nvmet_execute_auth_receive()
565 pr_warn("ctrl %d qid %d unhandled step (%d)\n", in nvmet_execute_auth_receive()
569 nvmet_auth_failure1(req, d, al); in nvmet_execute_auth_receive()
574 status = nvmet_copy_to_sgl(req, 0, d, al); in nvmet_execute_auth_receive()
575 kfree(d); in nvmet_execute_auth_receive()