All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	"Martin K . Petersen" <mkp@kernel.org>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lee Duncan <lduncan@suse.com>,
	Alexandru Hossu <hossu.alexandru@gmail.com>
Subject: Re: [PATCH] scsi: target: iscsi: Use crypto library API
Date: Sun, 11 Oct 2026 23:36:00 +1100	[thread overview]
Message-ID: <20261011233600.5bb5d6c9.ddiss@suse.de> (raw)
In-Reply-To: <20261001044857.169487-1-ebiggers@kernel.org>

This looks like a worthwhile clean-up and doesn't trigger any libiscsi
chap test regressions.
Reviewed-by: David Disseldorp <ddiss@suse.de>

I do have one minor concern: 

On Wed, 30 Sep 2026 21:48:57 -0700, Eric Biggers wrote:

> Make iscsi_target_auth.c call into the crypto library directly instead
> of going through crypto_shash.  This is simpler and much more efficient,
> as it avoids overhead of the crypto_shash layer.  The hash computation
> itself also no longer has error codes that need to be checked.
> 
> For simplicity, still do a memory allocation per operation to buffer the
> data (which is typically less than 50 bytes here) so that the one-shot
> digest functions can be used.  It's still much more efficient than doing
> the super slow crypto_alloc_shash().
> 
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  drivers/target/iscsi/Kconfig             |   7 +-
>  drivers/target/iscsi/iscsi_target_auth.c | 192 +++++++++--------------
>  drivers/target/iscsi/iscsi_target_auth.h |   8 +-
>  3 files changed, 78 insertions(+), 129 deletions(-)
...
> @@ -113,17 +143,17 @@ static int chap_check_algorithm(const char *a_str)
>  		if (kstrtol(token, 10, &digest_type))
>  			continue;
>  
> -		digest_name = chap_get_digest_name(digest_type);
> -		if (!digest_name)
> +		if (fips_enabled && digest_type == CHAP_DIGEST_MD5)
>  			continue;

Could e.g. SHA1 also require fips filtering here in future? If so, would
it make sense to track the fips compat status (preferably at build time)
in chap_digest_algs?


  reply	other threads:[~2026-10-11 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01  4:48 [PATCH] scsi: target: iscsi: Use crypto library API Eric Biggers
2026-10-11 12:36 ` David Disseldorp [this message]
2026-10-11 19:12   ` Eric Biggers
2026-10-12  1:46     ` David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261011233600.5bb5d6c9.ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=ebiggers@kernel.org \
    --cc=hossu.alexandru@gmail.com \
    --cc=lduncan@suse.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.