On Wed, Apr 17, 2019 at 08:29:59PM -0700, Ard Biesheuvel wrote:
>
> Seems like I was misreading the code: we have the following code in
> skcipher_walk_next
> 
> if (!err && (walk->flags & SKCIPHER_WALK_PHYS)) {
>     walk->src.phys.page = virt_to_page(walk->src.virt.addr);
>     walk->dst.phys.page = virt_to_page(walk->dst.virt.addr);
>     walk->src.phys.offset &= PAGE_SIZE - 1;
>     walk->dst.phys.offset &= PAGE_SIZE - 1;
> }
> 
> but all that does is normalize the offset. In fact, this code looks
> slightly dodgy to me, given that, if the offset /does/ exceed
> PAGE_SIZE, it normalizes the offset but does not advance the page
> pointers accordingly.

I wouldn't be surprised if the async walk code is buggy.  Hardly
anybody uses this.

Cheers,
-- 
Email: Herbert Xu <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Reply via email to