From: Herbert Xu <herbert@gondor.apana.org.au>
To: Weili Qian <qianweili@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
liulongfang@huawei.com
Subject: Re: [PATCH 3/4] crypto: hisilicon/qm - check queue depth read from hardware
Date: Fri, 2 Oct 2026 17:51:18 +1000 [thread overview]
Message-ID: <ar9idr-u72CMxPLR@gondor.apana.org.au> (raw)
In-Reply-To: <20260924113812.1110302-4-qianweili@huawei.com>
On Thu, Sep 24, 2026 at 07:38:11PM +0800, Weili Qian wrote:
> When hardware is abnormal, queue depth values read from registers may
> be invalid, causing array out of bounds or division by zero.
>
> Add a QM_XQC_MIN_DEPTH check in qm_get_xqc_depth() so all callers are
> covered. The check only applies to QM_HW_V3 and later, where depth is
> read from registers.
>
> Fixes: 129a9f340172 ("crypto: hisilicon/qm - get qp num and depth from hardware registers")
> Signed-off-by: Weili Qian <qianweili@huawei.com>
> ---
> drivers/crypto/hisilicon/qm.c | 34 +++++++++++++++++++++++++++++-----
> 1 file changed, 29 insertions(+), 5 deletions(-)
Please check
https://sashiko.dev/#/patchset/20260924113812.1110302-1-qianweili%40huawei.com
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
next prev parent reply other threads:[~2026-10-02 7:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 11:38 [PATCH 0/4] crypto: hisilicon/qm - fix bugs and harden against abnormal hardware Weili Qian
2026-09-24 11:38 ` [PATCH 1/4] crypto: hisilicon/qm - clear runtime PM flag for non-power-manageable device Weili Qian
2026-09-24 11:38 ` [PATCH 2/4] crypto: hisilicon/qm - return error for abnormal device capability version Weili Qian
2026-09-24 11:38 ` [PATCH 3/4] crypto: hisilicon/qm - check queue depth read from hardware Weili Qian
2026-10-02 7:51 ` Herbert Xu [this message]
2026-09-24 11:38 ` [PATCH 4/4] crypto: hisilicon/qm - fix uacce leak when SVA is not supported Weili Qian
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=ar9idr-u72CMxPLR@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=qianweili@huawei.com \
/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
all inboxes | Powered by JetHome®