Lines Matching full:ctrl

20 	pr_debug("%s: ctrl %d qid %d transaction %u expired, resetting\n",  in nvmet_auth_expired_work()
21 __func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid); in nvmet_auth_expired_work()
36 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_auth_negotiate() local
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()
41 __func__, ctrl->cntlid, req->sq->qid, in nvmet_auth_negotiate()
64 ctrl->concat = true; in nvmet_auth_negotiate()
80 if (ctrl->shash_id != host_hmac_id) in nvmet_auth_negotiate()
82 hash_id = ctrl->shash_id; in nvmet_auth_negotiate()
87 pr_debug("%s: ctrl %d qid %d: no usable hash found\n", in nvmet_auth_negotiate()
88 __func__, ctrl->cntlid, req->sq->qid); in nvmet_auth_negotiate()
91 pr_debug("%s: ctrl %d qid %d: no usable hash found, falling back to %s\n", in nvmet_auth_negotiate()
92 __func__, ctrl->cntlid, req->sq->qid, in nvmet_auth_negotiate()
94 ctrl->shash_id = fallback_hash_id; in nvmet_auth_negotiate()
102 if (tmp_dhgid != ctrl->dh_gid) { in nvmet_auth_negotiate()
115 pr_debug("%s: ctrl %d qid %d: no usable DH group found\n", in nvmet_auth_negotiate()
116 __func__, ctrl->cntlid, req->sq->qid); in nvmet_auth_negotiate()
119 pr_debug("%s: ctrl %d qid %d: configured DH group %s not found\n", in nvmet_auth_negotiate()
120 __func__, ctrl->cntlid, req->sq->qid, in nvmet_auth_negotiate()
122 ctrl->dh_gid = fallback_dhgid; in nvmet_auth_negotiate()
124 if (ctrl->dh_gid == NVME_AUTH_DHGROUP_NULL && ctrl->concat) { in nvmet_auth_negotiate()
125 pr_debug("%s: ctrl %d qid %d: NULL DH group invalid " in nvmet_auth_negotiate()
127 ctrl->cntlid, req->sq->qid); in nvmet_auth_negotiate()
130 pr_debug("%s: ctrl %d qid %d: selected DH group %s (%d)\n", in nvmet_auth_negotiate()
131 __func__, ctrl->cntlid, req->sq->qid, in nvmet_auth_negotiate()
132 nvme_auth_dhgroup_name(ctrl->dh_gid), ctrl->dh_gid); in nvmet_auth_negotiate()
138 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_auth_reply() local
143 pr_debug("%s: ctrl %d qid %d: data hl %d cvalid %d dhvlen %u\n", in nvmet_auth_reply()
144 __func__, ctrl->cntlid, req->sq->qid, in nvmet_auth_reply()
148 if (!ctrl->dh_tfm) in nvmet_auth_reply()
159 if (!ctrl->host_key) { in nvmet_auth_reply()
160 pr_warn("ctrl %d qid %d no host key\n", in nvmet_auth_reply()
161 ctrl->cntlid, req->sq->qid); in nvmet_auth_reply()
166 pr_debug("ctrl %d qid %d host hash failed\n", in nvmet_auth_reply()
167 ctrl->cntlid, req->sq->qid); in nvmet_auth_reply()
173 pr_info("ctrl %d qid %d host response mismatch\n", in nvmet_auth_reply()
174 ctrl->cntlid, req->sq->qid); in nvmet_auth_reply()
175 pr_debug("ctrl %d qid %d rval %*ph\n", in nvmet_auth_reply()
176 ctrl->cntlid, req->sq->qid, data->hl, data->rval); in nvmet_auth_reply()
177 pr_debug("ctrl %d qid %d response %*ph\n", in nvmet_auth_reply()
178 ctrl->cntlid, req->sq->qid, data->hl, response); in nvmet_auth_reply()
183 pr_debug("%s: ctrl %d qid %d host authenticated\n", in nvmet_auth_reply()
184 __func__, ctrl->cntlid, req->sq->qid); in nvmet_auth_reply()
185 if (!data->cvalid && ctrl->concat) { in nvmet_auth_reply()
186 pr_debug("%s: ctrl %d qid %d invalid challenge\n", in nvmet_auth_reply()
187 __func__, ctrl->cntlid, req->sq->qid); in nvmet_auth_reply()
197 pr_debug("%s: ctrl %d qid %d challenge %*ph\n", in nvmet_auth_reply()
198 __func__, ctrl->cntlid, req->sq->qid, data->hl, in nvmet_auth_reply()
210 if (ctrl->concat) in nvmet_auth_reply()
235 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_auth_send() local
283 pr_debug("%s: ctrl %d qid %d type %d id %d step %x\n", __func__, in nvmet_execute_auth_send()
284 ctrl->cntlid, req->sq->qid, data->auth_type, data->auth_id, in nvmet_execute_auth_send()
292 pr_debug("%s: ctrl %d qid %d reset negotiation\n", in nvmet_execute_auth_send()
293 __func__, ctrl->cntlid, req->sq->qid); in nvmet_execute_auth_send()
295 dhchap_status = nvmet_setup_auth(ctrl, req->sq); in nvmet_execute_auth_send()
297 pr_err("ctrl %d qid 0 failed to setup re-authentication\n", in nvmet_execute_auth_send()
298 ctrl->cntlid); in nvmet_execute_auth_send()
322 pr_debug("%s: ctrl %d qid %d step mismatch (%d != %d)\n", in nvmet_execute_auth_send()
323 __func__, ctrl->cntlid, req->sq->qid, in nvmet_execute_auth_send()
328 pr_debug("%s: ctrl %d qid %d invalid transaction %d (expected %d)\n", in nvmet_execute_auth_send()
329 __func__, ctrl->cntlid, req->sq->qid, in nvmet_execute_auth_send()
352 if (ctrl->concat) in nvmet_execute_auth_send()
355 pr_debug("%s: ctrl %d qid %d ctrl authenticated\n", in nvmet_execute_auth_send()
356 __func__, ctrl->cntlid, req->sq->qid); in nvmet_execute_auth_send()
361 pr_warn("ctrl %d qid %d: authentication failed (%d)\n", in nvmet_execute_auth_send()
362 ctrl->cntlid, req->sq->qid, dhchap_status); in nvmet_execute_auth_send()
382 pr_debug("%s: ctrl %d qid %d dhchap status %x step %x\n", __func__, in nvmet_execute_auth_send()
383 ctrl->cntlid, req->sq->qid, in nvmet_execute_auth_send()
386 pr_debug("%s: ctrl %d qid %d nvme status %x error loc %d\n", in nvmet_execute_auth_send()
387 __func__, ctrl->cntlid, req->sq->qid, in nvmet_execute_auth_send()
391 unsigned long auth_expire_secs = ctrl->kato ? ctrl->kato : 120; in nvmet_execute_auth_send()
400 nvmet_ctrl_fatal_error(ctrl); in nvmet_execute_auth_send()
409 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_auth_challenge() local
411 int hash_len = nvme_auth_hmac_hash_len(ctrl->shash_id); in nvmet_auth_challenge()
414 if (ctrl->dh_tfm) in nvmet_auth_challenge()
415 data_size += ctrl->dh_keysize; in nvmet_auth_challenge()
426 data->hashid = ctrl->shash_id; in nvmet_auth_challenge()
434 if (ctrl->dh_tfm) { in nvmet_auth_challenge()
435 data->dhgid = ctrl->dh_gid; in nvmet_auth_challenge()
436 data->dhvlen = cpu_to_le16(ctrl->dh_keysize); in nvmet_auth_challenge()
438 ctrl->dh_keysize); in nvmet_auth_challenge()
440 pr_debug("%s: ctrl %d qid %d seq %d transaction %d hl %d dhvlen %zu\n", in nvmet_auth_challenge()
441 __func__, ctrl->cntlid, req->sq->qid, req->sq->dhchap_s1, in nvmet_auth_challenge()
442 req->sq->dhchap_tid, data->hl, ctrl->dh_keysize); in nvmet_auth_challenge()
449 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_auth_success1() local
450 int hash_len = nvme_auth_hmac_hash_len(ctrl->shash_id); in nvmet_auth_success1()
459 if (!ctrl->ctrl_key) { in nvmet_auth_success1()
460 pr_warn("ctrl %d qid %d no ctrl key\n", in nvmet_auth_success1()
461 ctrl->cntlid, req->sq->qid); in nvmet_auth_success1()
467 pr_debug("ctrl %d qid %d response %*ph\n", in nvmet_auth_success1()
468 ctrl->cntlid, req->sq->qid, data->hl, data->rval); in nvmet_auth_success1()
492 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_auth_receive() local
532 pr_debug("%s: ctrl %d qid %d step %x\n", __func__, in nvmet_execute_auth_receive()
533 ctrl->cntlid, req->sq->qid, req->sq->dhchap_step); in nvmet_execute_auth_receive()
537 pr_warn("ctrl %d qid %d: challenge error (%d)\n", in nvmet_execute_auth_receive()
538 ctrl->cntlid, req->sq->qid, status); in nvmet_execute_auth_receive()
550 pr_warn("ctrl %d qid %d: success1 status (%x)\n", in nvmet_execute_auth_receive()
551 ctrl->cntlid, req->sq->qid, in nvmet_execute_auth_receive()
560 pr_warn("ctrl %d qid %d failure1 (%x)\n", in nvmet_execute_auth_receive()
561 ctrl->cntlid, req->sq->qid, req->sq->dhchap_status); in nvmet_execute_auth_receive()
564 pr_warn("ctrl %d qid %d unhandled step (%d)\n", in nvmet_execute_auth_receive()
565 ctrl->cntlid, req->sq->qid, req->sq->dhchap_step); in nvmet_execute_auth_receive()
580 nvmet_ctrl_fatal_error(ctrl); in nvmet_execute_auth_receive()