* [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP
@ 2021-10-15 13:11 Vegard Nossum
2021-10-15 13:36 ` Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: Vegard Nossum @ 2021-10-15 13:11 UTC (permalink / raw)
To: Lee Duncan, Chris Leech
Cc: James E.J. Bottomley, Martin K. Petersen, open-iscsi, linux-scsi,
linux-kernel, Vegard Nossum, Herbert Xu
Fix the following build/link error by adding a dependency on CRYPTO_HASH:
ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_dgst_header':
libiscsi_tcp.c:(.text+0x237): undefined reference to `crypto_ahash_digest'
ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_segment_done':
libiscsi_tcp.c:(.text+0x1325): undefined reference to `crypto_ahash_final'
Fixes: 5d6ac29b9ebf2 ("iscsi_tcp: Use ahash")
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
drivers/scsi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 6e3a04107bb65..09764f3c42447 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -290,6 +290,7 @@ config ISCSI_TCP
tristate "iSCSI Initiator over TCP/IP"
depends on SCSI && INET
select CRYPTO
+ select CRYPTO_HASH
select CRYPTO_MD5
select CRYPTO_CRC32C
select SCSI_ISCSI_ATTRS
--
2.23.0.718.g5ad94255a8
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP
2021-10-15 13:11 [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP Vegard Nossum
@ 2021-10-15 13:36 ` Herbert Xu
2021-10-15 13:54 ` Vegard Nossum
0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2021-10-15 13:36 UTC (permalink / raw)
To: Vegard Nossum
Cc: Lee Duncan, Chris Leech, James E.J. Bottomley,
Martin K. Petersen, open-iscsi, linux-scsi, linux-kernel
On Fri, Oct 15, 2021 at 03:11:15PM +0200, Vegard Nossum wrote:
> Fix the following build/link error by adding a dependency on CRYPTO_HASH:
>
> ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_dgst_header':
> libiscsi_tcp.c:(.text+0x237): undefined reference to `crypto_ahash_digest'
> ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_segment_done':
> libiscsi_tcp.c:(.text+0x1325): undefined reference to `crypto_ahash_final'
>
> Fixes: 5d6ac29b9ebf2 ("iscsi_tcp: Use ahash")
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
> ---
> drivers/scsi/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
> index 6e3a04107bb65..09764f3c42447 100644
> --- a/drivers/scsi/Kconfig
> +++ b/drivers/scsi/Kconfig
> @@ -290,6 +290,7 @@ config ISCSI_TCP
> tristate "iSCSI Initiator over TCP/IP"
> depends on SCSI && INET
> select CRYPTO
> + select CRYPTO_HASH
> select CRYPTO_MD5
> select CRYPTO_CRC32C
> select SCSI_ISCSI_ATTRS
CRYPTO_MD5 already selects CRYPTO_HASH so this shouldn't be needed.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP
2021-10-15 13:36 ` Herbert Xu
@ 2021-10-15 13:54 ` Vegard Nossum
2021-10-15 17:03 ` Chris Leech
0 siblings, 1 reply; 4+ messages in thread
From: Vegard Nossum @ 2021-10-15 13:54 UTC (permalink / raw)
To: Herbert Xu
Cc: Lee Duncan, Chris Leech, James E.J. Bottomley,
Martin K. Petersen, open-iscsi, linux-scsi, linux-kernel
On 10/15/21 3:36 PM, Herbert Xu wrote:
> On Fri, Oct 15, 2021 at 03:11:15PM +0200, Vegard Nossum wrote:
>> Fix the following build/link error by adding a dependency on CRYPTO_HASH:
>>
>> ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_dgst_header':
>> libiscsi_tcp.c:(.text+0x237): undefined reference to `crypto_ahash_digest'
>> ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_segment_done':
>> libiscsi_tcp.c:(.text+0x1325): undefined reference to `crypto_ahash_final'
>>
>> Fixes: 5d6ac29b9ebf2 ("iscsi_tcp: Use ahash")
>> Cc: Herbert Xu <herbert@gondor.apana.org.au>
>> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
>> ---
>> drivers/scsi/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
>> index 6e3a04107bb65..09764f3c42447 100644
>> --- a/drivers/scsi/Kconfig
>> +++ b/drivers/scsi/Kconfig
>> @@ -290,6 +290,7 @@ config ISCSI_TCP
>> tristate "iSCSI Initiator over TCP/IP"
>> depends on SCSI && INET
>> select CRYPTO
>> + select CRYPTO_HASH
>> select CRYPTO_MD5
>> select CRYPTO_CRC32C
>> select SCSI_ISCSI_ATTRS
>
> CRYPTO_MD5 already selects CRYPTO_HASH so this shouldn't be needed.
You're right, my apologies.
libiscsi_tcp.o is built for CONFIG_ISCSI_TCP, but it's _also_ built for
CONFIG_SCSI_CXGB3_ISCSI and CONFIG_SCSI_CXGB4_ISCSI. I missed that when
I looked at the Makefile and wrongly assumed that CONFIG_ISCSI_TCP was
missing the select.
I'm not sure what the right fix here would be -- should
CONFIG_SCSI_CXGB[34]_ISCSI depend on CONFIG_ISCSI_TCP..? Or should we
add those CRYPTO* selects in there as well?
Vegard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP
2021-10-15 13:54 ` Vegard Nossum
@ 2021-10-15 17:03 ` Chris Leech
0 siblings, 0 replies; 4+ messages in thread
From: Chris Leech @ 2021-10-15 17:03 UTC (permalink / raw)
To: Vegard Nossum
Cc: Herbert Xu, Lee Duncan, James E.J. Bottomley, Martin K. Petersen,
open-iscsi, linux-scsi, linux-kernel
On Fri, Oct 15, 2021 at 6:54 AM Vegard Nossum <vegard.nossum@oracle.com> wrote:
>
>
> On 10/15/21 3:36 PM, Herbert Xu wrote:
> > On Fri, Oct 15, 2021 at 03:11:15PM +0200, Vegard Nossum wrote:
> >> Fix the following build/link error by adding a dependency on CRYPTO_HASH:
> >>
> >> ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_dgst_header':
> >> libiscsi_tcp.c:(.text+0x237): undefined reference to `crypto_ahash_digest'
> >> ld: drivers/scsi/libiscsi_tcp.o: in function `iscsi_tcp_segment_done':
> >> libiscsi_tcp.c:(.text+0x1325): undefined reference to `crypto_ahash_final'
> >>
> >> Fixes: 5d6ac29b9ebf2 ("iscsi_tcp: Use ahash")
> >> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> >> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
> >> ---
> >> drivers/scsi/Kconfig | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
> >> index 6e3a04107bb65..09764f3c42447 100644
> >> --- a/drivers/scsi/Kconfig
> >> +++ b/drivers/scsi/Kconfig
> >> @@ -290,6 +290,7 @@ config ISCSI_TCP
> >> tristate "iSCSI Initiator over TCP/IP"
> >> depends on SCSI && INET
> >> select CRYPTO
> >> + select CRYPTO_HASH
> >> select CRYPTO_MD5
> >> select CRYPTO_CRC32C
> >> select SCSI_ISCSI_ATTRS
> >
> > CRYPTO_MD5 already selects CRYPTO_HASH so this shouldn't be needed.
>
> You're right, my apologies.
>
> libiscsi_tcp.o is built for CONFIG_ISCSI_TCP, but it's _also_ built for
> CONFIG_SCSI_CXGB3_ISCSI and CONFIG_SCSI_CXGB4_ISCSI. I missed that when
> I looked at the Makefile and wrongly assumed that CONFIG_ISCSI_TCP was
> missing the select.
>
> I'm not sure what the right fix here would be -- should
> CONFIG_SCSI_CXGB[34]_ISCSI depend on CONFIG_ISCSI_TCP..? Or should we
> add those CRYPTO* selects in there as well?
(apologies for the HTML reply that got rejected by the lists, and the
double reply to those directly addressed)
Are Kconfig entries for libiscsi and libiscsi_tcp needed to handle
this properly? Currently they're added to the object lists with each
configured driver that requires them. I'm not even sure what happens
if you manage to configure them into both obj-y and obj-m.
- Chris Leech
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-15 17:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 13:11 [PATCH] scsi: libiscsi: select CRYPTO_HASH for ISCSI_TCP Vegard Nossum
2021-10-15 13:36 ` Herbert Xu
2021-10-15 13:54 ` Vegard Nossum
2021-10-15 17:03 ` Chris Leech
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).