Skip to contentSkip to conversation

SCSI: OSD: Kconfig: Select SHA1 and HMAC for OSD Initiator library

PATCH In review Maxin B. John 2 participants 7 messages Aug 11, 2011 – Aug 25, 2011 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCSI: OSD: Kconfig: Select SHA1 and HMAC for OSD Initiator library

SCSI_OSD_INITIATOR should select CRYPTO_SHA1 and CRYPTO_HMAC. Express this in Kconfig so that the requirements are met automatically.

---

drivers/scsi/osd/Kconfig +3 -4
index 861b5ce..1535fe1 100644
@@ -11,17 +11,16 @@
 # it under the terms of the GNU General Public version 2 License as
 # published by the Free Software Foundation
 #
-# FIXME: SCSI_OSD_INITIATOR should select CONFIG (HMAC) SHA1 somehow.
-#        How is it done properly?
 #
 
 config SCSI_OSD_INITIATOR
 	tristate "OSD-Initiator library"
 	depends on SCSI
+	select CRYPTO
+	select CRYPTO_SHA1
+	select CRYPTO_HMAC
 	help
 		Enable the OSD-Initiator library (libosd.ko).
-		NOTE: You must also select CRYPTO_SHA1 + CRYPTO_HMAC and their
-		dependencies
 
 config SCSI_OSD_ULD
 	tristate "OSD Upper Level driver"
#1 lore raw

Ping..

Quoted 28 lines · Maxin B. John

SCSI_OSD_INITIATOR should select CRYPTO_SHA1 and CRYPTO_HMAC. Express this in Kconfig so that the requirements are met automatically.

---

drivers/scsi/osd/Kconfig +0 -2
index 861b5ce..1535fe1 100644
@@ -11,17 +11,16 @@
  # it under the terms of the GNU General Public version 2 License as
  # published by the Free Software Foundation
  #
-# FIXME: SCSI_OSD_INITIATOR should select CONFIG (HMAC) SHA1 somehow.
-#        How is it done properly?
  #
 

 config SCSI_OSD_INITIATOR
       tristate "OSD-Initiator library"
       depends on SCSI
+       select CRYPTO
+       select CRYPTO_SHA1
+       select CRYPTO_HMAC
       help
               Enable the OSD-Initiator library (libosd.ko).
-               NOTE: You must also select CRYPTO_SHA1 + CRYPTO_HMAC and their
-               dependencies

Quoted 3 lines

 config SCSI_OSD_ULD
       tristate "OSD Upper Level driver"

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · Maxin B John

Ping..

Quoted 4 lines · Maxin B. John

SCSI_OSD_INITIATOR should select CRYPTO_SHA1 and CRYPTO_HMAC. Express this in Kconfig so that the requirements are met automatically.

Yes sorry. It was on my todo and I never got to it.

OK So actually current osd_initiator code does not use these libraries. It should, and I have very old code that started on that (hence the comment), but it was never submitted to Kernel. The OSD protocol calls for all kind of security levels that use these, but the current code only supports NO_SEC.

I will keep your patch for when security code goes in. Meanwhile I should at least remove the stale comment.

Thanks
Boaz

Quoted 27 lines
Quoted 27 lines

---

drivers/scsi/osd/Kconfig +3 -4
index 861b5ce..1535fe1 100644
@@ -11,17 +11,16 @@
 # it under the terms of the GNU General Public version 2 License as
 # published by the Free Software Foundation
 #
-# FIXME: SCSI_OSD_INITIATOR should select CONFIG (HMAC) SHA1 somehow.
-#        How is it done properly?
 #
 
 config SCSI_OSD_INITIATOR
       tristate "OSD-Initiator library"
       depends on SCSI
+       select CRYPTO
+       select CRYPTO_SHA1
+       select CRYPTO_HMAC
       help
               Enable the OSD-Initiator library (libosd.ko).
-               NOTE: You must also select CRYPTO_SHA1 + CRYPTO_HMAC and their
-               dependencies
 
 config SCSI_OSD_ULD
       tristate "OSD Upper Level driver"
#3 lore raw

PATCH 1/1 osd: Kconfig remove wrong FIXME

The OSD protocol calls for all kind of security levels that use CRYPTO_HMAC and SH1, but the current code only supports NO_SEC, which does not use any of these.

Remove a wrong FIXME that calls for them. Thanks Maxin for reporting on this.

CC "Maxin B. John" <[email protected]>
---
 drivers/scsi/osd/Kconfig |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/scsi/osd/Kconfig +0 -4
index 861b5ce..a070351 100644
@@ -11,10 +11,6 @@
 # it under the terms of the GNU General Public version 2 License as
 # published by the Free Software Foundation
 #
-# FIXME: SCSI_OSD_INITIATOR should select CONFIG (HMAC) SHA1 somehow.
-#        How is it done properly?
-#
-
 config SCSI_OSD_INITIATOR
 	tristate "OSD-Initiator library"
 	depends on SCSI
Signature · 1 line
1.7.6
#4 lore raw

Re: [PATCH] osd: Kconfig remove wrong FIXME

Hi,

Quoted 26 lines · Boaz Harrosh

The OSD protocol calls for all kind of security levels that use CRYPTO_HMAC and SH1, but the current code only supports NO_SEC, which does not use any of these.

Remove a wrong FIXME that calls for them. Thanks Maxin for reporting on this.

CC "Maxin B. John" <[email protected]>

---
 drivers/scsi/osd/Kconfig |    4 ----

 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/scsi/osd/Kconfig +0 -4
index 861b5ce..a070351 100644
@@ -11,10 +11,6 @@
  # it under the terms of the GNU General Public version 2 License as
  # published by the Free Software Foundation
  #
-# FIXME: SCSI_OSD_INITIATOR should select CONFIG (HMAC) SHA1 somehow.
-#        How is it done properly?
-#
-
Quoted 6 lines

 config SCSI_OSD_INITIATOR
       tristate "OSD-Initiator library"
       depends on SCSI
--
1.7.6

Adding the "Reported-by", if it's not too late:

Cheers,
Maxin
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

Re: [PATCH] osd: Kconfig remove wrong FIXME

Quoted 38 lines · Maxin B John

Hi,

Quoted 30 lines · Boaz Harrosh

The OSD protocol calls for all kind of security levels that use CRYPTO_HMAC and SH1, but the current code only supports NO_SEC, which does not use any of these.

Remove a wrong FIXME that calls for them. Thanks Maxin for reporting on this.

CC "Maxin B. John" <[email protected]>
---
 drivers/scsi/osd/Kconfig |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/scsi/osd/Kconfig +0 -5
index 861b5ce..a070351 100644
@@ -11,10 +11,6 @@
 # it under the terms of the GNU General Public version 2 License as
 # published by the Free Software Foundation
 #
-# FIXME: SCSI_OSD_INITIATOR should select CONFIG (HMAC) SHA1 somehow.
-#        How is it done properly?
-#
-
 config SCSI_OSD_INITIATOR
       tristate "OSD-Initiator library"
       depends on SCSI
--
Quoted 2 lines

1.7.6

Adding the "Reported-by", if it's not too late:

Quoted 2 lines

Sure I will add it. It's not to late

Boaz

Quoted 7 lines

Cheers,
Maxin
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to Boaz Harrosh

Hi,

Quoted 7 lines · Boaz Harrosh
Quoted 5 lines · Maxin B John
Quoted 4 lines · Maxin B. John

SCSI_OSD_INITIATOR should select CRYPTO_SHA1 and CRYPTO_HMAC. Express this in Kconfig so that the requirements are met automatically.

Quoted 7 lines

OK So actually current osd_initiator code does not use these libraries. It should, and I have very old code that started on that (hence the comment), but it was never submitted to Kernel. The OSD protocol calls for all kind of security levels that use these, but the current code only supports NO_SEC.

I will keep your patch for when security code goes in. Meanwhile I should at least remove the stale comment.

Sorry for the delay in reply. Yes, this makes perfect sense to me.

Cheers,
Maxin