On 08/24/18 09:22 PM, Herbert Xu wrote:
> > > BTW. gcmaes_crypt_by_sg also contains GFP_ATOMIC and -ENOMEM, behind a
> > > pretty complex condition. Do you mean that this condition is part of the
> > > contract that the crypto API provides?
> >
> > This is an implementation defect. I think for
On Fri, Aug 24, 2018 at 09:21:45PM +0800, Herbert Xu wrote:
> On Fri, Aug 24, 2018 at 09:00:00AM -0400, Mikulas Patocka wrote:
> >
> > BTW. gcmaes_crypt_by_sg also contains GFP_ATOMIC and -ENOMEM, behind a
> > pretty complex condition. Do you mean that this condition is part of the
> > contract
On Fri, Aug 24, 2018 at 09:00:00AM -0400, Mikulas Patocka wrote:
>
> BTW. gcmaes_crypt_by_sg also contains GFP_ATOMIC and -ENOMEM, behind a
> pretty complex condition. Do you mean that this condition is part of the
> contract that the crypto API provides?
This is an implementation defect. I
On Fri, 24 Aug 2018, Mikulas Patocka wrote:
>
>
> On Fri, 24 Aug 2018, Herbert Xu wrote:
>
> > On Fri, Aug 24, 2018 at 07:06:32AM -0400, Mikulas Patocka wrote:
> > >
> > > A quick search through the crypto code shows that ahash_save_req and
> > > seqiv_aead_encrypt return -ENOMEM.
> > >
>
On Fri, 24 Aug 2018, Herbert Xu wrote:
> On Fri, Aug 24, 2018 at 07:06:32AM -0400, Mikulas Patocka wrote:
> >
> > A quick search through the crypto code shows that ahash_save_req and
> > seqiv_aead_encrypt return -ENOMEM.
> >
> > Will you fix them?
>
> These only trigger for unaligned
On Fri, Aug 24, 2018 at 07:22:19AM -0400, Mikulas Patocka wrote:
>
> And also ablkcipher_next_slow, ablkcipher_copy_iv, skcipher_next_slow,
> skcipher_next_copy, skcipher_copy_iv, blkcipher_next_slow,
> blkcipher_copy_iv.
>
> So, I think that dropping CRYPTO_TFM_REQ_MAY_SLEEP is not possible.
On Fri, 24 Aug 2018, Mikulas Patocka wrote:
>
>
> On Fri, 24 Aug 2018, Herbert Xu wrote:
>
> > On Thu, Aug 23, 2018 at 04:39:23PM -0400, Mikulas Patocka wrote:
> > >
> > > 1. don't set CRYPTO_TFM_REQ_MAY_SLEEP in dm-crypt
> > > =
> > > If we
On Fri, 24 Aug 2018, Herbert Xu wrote:
> On Thu, Aug 23, 2018 at 04:39:23PM -0400, Mikulas Patocka wrote:
> >
> > 1. don't set CRYPTO_TFM_REQ_MAY_SLEEP in dm-crypt
> > =
> > If we don't set it, dm-crypt will use GFP_ATOMIC and GFP_ATOMIC may
On Thu, Aug 23, 2018 at 04:39:23PM -0400, Mikulas Patocka wrote:
>
> 1. don't set CRYPTO_TFM_REQ_MAY_SLEEP in dm-crypt
> =
> If we don't set it, dm-crypt will use GFP_ATOMIC and GFP_ATOMIC may fail.
> The function init_crypt in xts.c handles the