From: Mikulas Patocka <mpatocka@redhat.com>
To: Harald Freudenberger <freude@linux.ibm.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: Eric Biggers <ebiggers@kernel.org>,
dengler@linux.ibm.com, linux-s390@vger.kernel.org,
dm-devel@lists.linux.dev, ifranzki@linux.ibm.com,
agk@redhat.com, snitzer@kernel.org, gmazyland@gmail.com
Subject: Re: [PATCH v5 0/2] dm-integrity: Implement asynch digest support
Date: Mon, 28 Jul 2025 23:24:25 +0200 (CEST) [thread overview]
Message-ID: <51dc2ccd-c06d-e719-9568-35a8d3a1010f@redhat.com> (raw)
In-Reply-To: <dbe165f661d11a4bed8d7c806a9eeb5e@linux.ibm.com>
On Mon, 28 Jul 2025, Harald Freudenberger wrote:
> > > > > Mikulas Patocka (2):
> > > > > dm-integrity: use internal variable for digestsize
> > > > > dm-integrity: introduce ahash support for the internal hash
> > > > >
> > > > > drivers/md/dm-integrity.c | 370
> > > > > +++++++++++++++++++++++++++-----------
> > > > > 1 file changed, 265 insertions(+), 105 deletions(-)
Hi
I reviewed the code and unfortunatelly I found out that it is buggy (I
didn't notice the bugs before, when I was working on it).
integrity_ahash_sector_checksum uses sg_set_buf and sg_set_buf needs
directly mapped memory. It doesn't work with vmalloc memory and it doesn't
work with memory obtained from kmap.
The result buffer may be vmallocated memory (if we have
CONFIG_VMAP_STACK).
I'd like to ask the maintainers of crypto-api - Herbert or David - what if
I pass vmalloc-allocated memory (or possibly stack memory) as "result" to
ahash_request_set_crypt(req, sg, result, nbytes);? Is it legal or not?
Mikulas
next prev parent reply other threads:[~2025-07-28 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 13:38 [PATCH v5 0/2] dm-integrity: Implement asynch digest support Harald Freudenberger
2025-07-22 13:38 ` [PATCH v5 1/2] dm-integrity: use internal variable for digestsize Harald Freudenberger
2025-07-22 13:38 ` [PATCH v5 2/2] dm-integrity: introduce ahash support for the internal hash Harald Freudenberger
2025-07-24 14:40 ` [PATCH v5 0/2] dm-integrity: Implement asynch digest support Mikulas Patocka
2025-07-25 8:14 ` Harald Freudenberger
2025-07-25 17:38 ` Eric Biggers
2025-07-28 10:11 ` Harald Freudenberger
2025-07-28 21:24 ` Mikulas Patocka [this message]
2025-07-29 1:40 ` Herbert Xu
2025-08-14 12:13 ` Harald Freudenberger
2025-08-18 19:49 ` Mikulas Patocka
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=51dc2ccd-c06d-e719-9568-35a8d3a1010f@redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=davem@davemloft.net \
--cc=dengler@linux.ibm.com \
--cc=dm-devel@lists.linux.dev \
--cc=ebiggers@kernel.org \
--cc=freude@linux.ibm.com \
--cc=gmazyland@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=ifranzki@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=snitzer@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.