[Intel-gfx] [PATCH 09/22] dm-crypt: Make use of the new sg_map helper in 4 call sites
Logan Gunthorpe
logang at deltatee.com
Fri Apr 14 16:03:43 UTC 2017
On 14/04/17 02:39 AM, Christoph Hellwig wrote:
> On Thu, Apr 13, 2017 at 04:05:22PM -0600, Logan Gunthorpe wrote:
>> Very straightforward conversion to the new function in all four spots.
>
> I think the right fix here is to switch dm-crypt to the ahash API
> that takes a scatterlist.
Hmm, well I'm not sure I understand the code enough to make that
conversion. But I was looking at it. One tricky bit seems to be that
crypt_iv_lmk_one adds a seed, skips the first 16 bytes in the page and
then hashes another 16 bytes from other data. What would you do
construct a new sgl for it and pass it to the ahash api?
The other thing is crypt_iv_lmk_post also seems to modify the page after
the hash with a crypto_xor so you'd still need at least one kmap in there.
Logan
More information about the Intel-gfx
mailing list