Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	Yosry Ahmed <yosry.ahmed@linux.dev>,
	Kanchana P Sridhar <kanchana.p.sridhar@intel.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [v3 PATCH 7/8] crypto: scomp - Remove support for most non-trivial destination SG lists
Date: Tue, 11 Mar 2025 11:13:52 +0800	[thread overview]
Message-ID: <Z8-qcLGAIaZXo5fc@gondor.apana.org.au> (raw)
In-Reply-To: <914f6ea6-bb6c-4feb-a4ac-23508a8ff335@stanley.mountain>

On Mon, Mar 10, 2025 at 10:31:06PM +0300, Dan Carpenter wrote:
>
> New smatch warnings:
> crypto/scompress.c:180 scomp_acomp_comp_decomp() error: we previously assumed 'req->dst' could be null (see line 174)

I think this is a false positive.

> 5b855462cc7e3f3 Herbert Xu                2025-03-09 @174  	if (req->dst && !dlen)
>                                                                     ^^^^^^^^
> Is this check necessary?

This is not trying to catch a null req->dst, but it's trying to
detect an combination of a non-null req->dst with a zero dlen.

A zero dlen is used to allocate req->dst on demand, which would
conflict with a non-null req->dst.

Cheers,
-- 
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

  reply	other threads:[~2025-03-11  3:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-09  2:43 [v3 PATCH 0/8] crypto: acomp - Add request chaining and virtual address support Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 1/8] crypto: api - Add cra_type->destroy hook Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 2/8] crypto: scomp - Remove tfm argument from alloc/free_ctx Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 3/8] crypto: acomp - Move stream management into scomp layer Herbert Xu
2025-03-16  4:36   ` Eric Biggers
2025-03-16  4:42     ` Herbert Xu
2025-03-16  4:46       ` Herbert Xu
2025-03-16  4:44     ` Herbert Xu
2025-03-17  8:36     ` Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 4/8] crypto: scomp - Disable BH when taking per-cpu spin lock Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 5/8] crypto: acomp - Add request chaining and virtual addresses Herbert Xu
2025-03-16  4:49   ` Eric Biggers
2025-03-16  5:43     ` Herbert Xu
2025-03-16  6:50       ` Eric Biggers
2025-03-20 17:24   ` Cabiddu, Giovanni
2025-03-21  2:33     ` Herbert Xu
2025-03-24  9:39       ` Cabiddu, Giovanni
2025-03-09  2:43 ` [v3 PATCH 6/8] crypto: testmgr - Remove NULL dst acomp tests Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 7/8] crypto: scomp - Remove support for most non-trivial destination SG lists Herbert Xu
2025-03-10 19:31   ` Dan Carpenter
2025-03-11  3:13     ` Herbert Xu [this message]
2025-03-11  3:16       ` Herbert Xu
2025-03-09  2:43 ` [v3 PATCH 8/8] crypto: scomp - Add chaining and virtual address support Herbert Xu

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=Z8-qcLGAIaZXo5fc@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=dan.carpenter@linaro.org \
    --cc=kanchana.p.sridhar@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=senozhatsky@chromium.org \
    --cc=yosry.ahmed@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