I debugged the crash that I got a bit further, in case it's helpful: When we 
died we're trying to encrypt a dnode, and `zio_crypt_init_uios_dnode` is 
setting `total_len = 0` (as well as `*no_crypt = B_TRUE`). In 
`zio_do_crypt_data` we carry on to call `zio_do_crypt_uio` after this returns, 
with `datalen = 0` (that's the `enc_len` that `init_uios_dnode` set to `0`), 
which then calls `crypto_encrypt` with the `plaindata.cd_length = 0`. This 
causes the AES module inside KCF to return `0xC` (`CRYPTO_DATA_LEN_RANGE`) 
because the length we gave it doesn't seem valid. So, we return `EIO` (the 5 
you can see in the panic message).

I'm not really sure what we should be doing here... the fact that we've set 
`no_crypt = B_TRUE` will mean that `zio_encrypt` is going to do the copy 
anyway, so I don't think we have to call in to try to encrypt in this case at 
all? For now, to keep testing, I just made `zio_do_crypt_data` ignore the 
return of `zio_do_crypt_uio` if `no_crypt` is set and that seems to hack around 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
Powered by Topicbox: https://topicbox.com

Reply via email to