From: Thomas Huth <thuth@redhat.com>
To: Thorsten Blum <thorsten.blum@linux.dev>,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: qat - use strscpy_pad to simplify adf_service_string_to_mask
Date: Mon, 6 Jul 2026 07:11:10 +0200 [thread overview]
Message-ID: <6ed4c75d-c17d-40e6-9ef2-6c29ca54342e@redhat.com> (raw)
In-Reply-To: <20260705133842.241401-3-thorsten.blum@linux.dev>
On 05/07/2026 15.38, Thorsten Blum wrote:
> Use strscpy_pad() to copy buf and zero-pad any trailing bytes instead of
> zero-initializing the local services buffer and then using strscpy() to
> copy into it. Also use the strscpy_pad() return value to detect string
> truncation instead of checking the caller-provided length.
>
> Remove the now-unused length parameters from
> adf_service_string_to_mask() and adf_parse_service_string(). Also remove
> the redundant strnlen() call in adf_get_service_mask(), which only
> computed the removed length argument.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> .../intel/qat/qat_common/adf_cfg_services.c | 15 ++++++---------
> .../intel/qat/qat_common/adf_cfg_services.h | 2 +-
> drivers/crypto/intel/qat/qat_common/adf_sysfs.c | 2 +-
> 3 files changed, 8 insertions(+), 11 deletions(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2026-07-06 5:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 13:38 [PATCH] crypto: qat - use strscpy_pad to simplify adf_service_string_to_mask Thorsten Blum
2026-07-06 5:11 ` Thomas Huth [this message]
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=6ed4c75d-c17d-40e6-9ef2-6c29ca54342e@redhat.com \
--to=thuth@redhat.com \
--cc=davem@davemloft.net \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=suman.kumar.chakraborty@intel.com \
--cc=thorsten.blum@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox