From: "J. Bruce Fields" <bfields@fieldses.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, nfsv4@linux-nfs.org
Subject: Re: [PATCH] crypto: scatterwalk_copychunks() fails to advance through scatterlist
Date: Tue, 20 Mar 2007 10:16:14 -0400 [thread overview]
Message-ID: <20070320141614.GA12165@fieldses.org> (raw)
In-Reply-To: <20070320051656.GA17711@gondor.apana.org.au>
On Tue, Mar 20, 2007 at 04:16:56PM +1100, Herbert Xu wrote:
> Thanks for the patch. However I still have a question as to why
> this is happening.
>
> As far as I can see scatterwalk_copychunks is only called in two
> places. In both spots it only processes one block of data. Since
> we set the maximum block size to PAGE_SIZE/8 I don't see how you
> can get an offset of zero and still roll over to the next page
> in scatterwalk_copychunks.
Are the elements of the scatterlists assumed to always be full pages? I
need to encrypt things that look like, for example:
sg[0].page = page1
sg[0].offset = 0
sg[0].length = 5
sg[1].page = page2
sg[1].offset = 0
sg[1].length = 37
and worse.... I could do this by hand if I had to, but the crypto code,
if it's not designed to handle this sort of thing, seems very close, so
I'd rather enhance it than duplicate a lot of this complicated
scatterlist-traversal stuff.
--b.
next prev parent reply other threads:[~2007-03-20 14:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 23:55 [PATCH] crypto: scatterwalk_copychunks() fails to advance through scatterlist J. Bruce Fields
2007-03-20 5:16 ` Herbert Xu
2007-03-20 14:16 ` J. Bruce Fields [this message]
2007-03-20 14:17 ` J. Bruce Fields
2007-03-20 20:54 ` Herbert Xu
2007-03-20 21:17 ` J. Bruce Fields
2007-03-20 22:04 ` 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=20070320141614.GA12165@fieldses.org \
--to=bfields@fieldses.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=nfsv4@linux-nfs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox