From: Herbert Xu <herbert@gondor.apana.org.au>
To: Peter Enderborg <peter.enderborg@sony.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
davem@davemloft.net, peter.enderborg@sony.com
Subject: Re: [PATCH] crypto: Mark tfm buffer as non leak.
Date: Fri, 4 Sep 2020 17:17:09 +1000 [thread overview]
Message-ID: <20200904071709.GA24539@gondor.apana.org.au> (raw)
In-Reply-To: <20200903134007.2769-1-peter.enderborg@sony.com>
Peter Enderborg <peter.enderborg@sony.com> wrote:
>
> This is caused by tfm = (struct crypto_tfm *)(mem + tfmsize);
> that is keept instead of the allocated buffer in mem.
> Reference counting is done on alg.
I don't understand why this is necessary. We end up returning
mem in crypto_create_tfm_node and that is the primary means of
getting to the object.
The tfm pointer is just an internal thing. So why do we have
to mark mem as not a leak?
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
prev parent reply other threads:[~2020-09-04 7:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 13:40 [PATCH] crypto: Mark tfm buffer as non leak Peter Enderborg
2020-09-04 7:17 ` Herbert Xu [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=20200904071709.GA24539@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.enderborg@sony.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;
as well as URLs for NNTP newsgroup(s).