File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,3 +6,12 @@ config NVME_COMMON
66config NVME_KEYRING
77 bool
88 select KEYS
9+
10+ config NVME_AUTH
11+ bool
12+ select CRYPTO
13+ select CRYPTO_HMAC
14+ select CRYPTO_SHA256
15+ select CRYPTO_SHA512
16+ select CRYPTO_DH
17+ select CRYPTO_DH_RFC7919_GROUPS
Original file line number Diff line number Diff line change @@ -107,16 +107,11 @@ config NVME_TCP_TLS
107107
108108 If unsure, say N.
109109
110- config NVME_AUTH
110+ config NVME_HOST_AUTH
111111 bool "NVM Express over Fabrics In-Band Authentication"
112112 depends on NVME_CORE
113113 select NVME_COMMON
114- select CRYPTO
115- select CRYPTO_HMAC
116- select CRYPTO_SHA256
117- select CRYPTO_SHA512
118- select CRYPTO_DH
119- select CRYPTO_DH_RFC7919_GROUPS
114+ select NVME_AUTH
120115 help
121116 This provides support for NVMe over Fabrics In-Band Authentication.
122117
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ nvme-core-$(CONFIG_NVME_MULTIPATH) += multipath.o
1717nvme-core-$(CONFIG_BLK_DEV_ZONED) += zns.o
1818nvme-core-$(CONFIG_FAULT_INJECTION_DEBUG_FS) += fault_inject.o
1919nvme-core-$(CONFIG_NVME_HWMON) += hwmon.o
20- nvme-core-$(CONFIG_NVME_AUTH) += auth.o
20+ nvme-core-$(CONFIG_NVME_HOST_AUTH) += auth.o
2121
2222nvme-y += pci.o
2323
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ void nvme_complete_rq(struct request *req)
421421 nvme_failover_req (req );
422422 return ;
423423 case AUTHENTICATE :
424- #ifdef CONFIG_NVME_AUTH
424+ #ifdef CONFIG_NVME_HOST_AUTH
425425 queue_work (nvme_wq , & ctrl -> dhchap_auth_work );
426426 nvme_retry_req (req );
427427#else
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ struct nvme_ctrl {
349349 struct work_struct ana_work ;
350350#endif
351351
352- #ifdef CONFIG_NVME_AUTH
352+ #ifdef CONFIG_NVME_HOST_AUTH
353353 struct work_struct dhchap_auth_work ;
354354 struct mutex dhchap_auth_mutex ;
355355 struct nvme_dhchap_queue_context * dhchap_ctxs ;
@@ -1049,7 +1049,7 @@ static inline bool nvme_ctrl_sgl_supported(struct nvme_ctrl *ctrl)
10491049 return ctrl -> sgls & ((1 << 0 ) | (1 << 1 ));
10501050}
10511051
1052- #ifdef CONFIG_NVME_AUTH
1052+ #ifdef CONFIG_NVME_HOST_AUTH
10531053int __init nvme_init_auth (void );
10541054void __exit nvme_exit_auth (void );
10551055int nvme_auth_init_ctrl (struct nvme_ctrl * ctrl );
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ static ssize_t dctype_show(struct device *dev,
409409}
410410static DEVICE_ATTR_RO (dctype );
411411
412- #ifdef CONFIG_NVME_AUTH
412+ #ifdef CONFIG_NVME_HOST_AUTH
413413static ssize_t nvme_ctrl_dhchap_secret_show (struct device * dev ,
414414 struct device_attribute * attr , char * buf )
415415{
@@ -563,7 +563,7 @@ static struct attribute *nvme_dev_attrs[] = {
563563 & dev_attr_kato .attr ,
564564 & dev_attr_cntrltype .attr ,
565565 & dev_attr_dctype .attr ,
566- #ifdef CONFIG_NVME_AUTH
566+ #ifdef CONFIG_NVME_HOST_AUTH
567567 & dev_attr_dhchap_secret .attr ,
568568 & dev_attr_dhchap_ctrl_secret .attr ,
569569#endif
@@ -593,7 +593,7 @@ static umode_t nvme_dev_attrs_are_visible(struct kobject *kobj,
593593 return 0 ;
594594 if (a == & dev_attr_fast_io_fail_tmo .attr && !ctrl -> opts )
595595 return 0 ;
596- #ifdef CONFIG_NVME_AUTH
596+ #ifdef CONFIG_NVME_HOST_AUTH
597597 if (a == & dev_attr_dhchap_secret .attr && !ctrl -> opts )
598598 return 0 ;
599599 if (a == & dev_attr_dhchap_ctrl_secret .attr && !ctrl -> opts )
Original file line number Diff line number Diff line change @@ -103,12 +103,7 @@ config NVME_TARGET_AUTH
103103 bool "NVMe over Fabrics In-band Authentication support"
104104 depends on NVME_TARGET
105105 select NVME_COMMON
106- select CRYPTO
107- select CRYPTO_HMAC
108- select CRYPTO_SHA256
109- select CRYPTO_SHA512
110- select CRYPTO_DH
111- select CRYPTO_DH_RFC7919_GROUPS
106+ select NVME_AUTH
112107 help
113108 This enables support for NVMe over Fabrics In-band Authentication
114109
You can’t perform that action at this time.
0 commit comments