On Wed, Nov 29, 2017 at 12:05:13PM +0100, Stephan Müller wrote:
>
> Shouldn't we then create a patch for the pre-4.14 algif_skcipher code that
> moves the wait out of the while loop to the beginning of the function in
> recvmsg?
When I said dead-lock I just meant that the recvmsg will block
inde
Am Mittwoch, 29. November 2017, 08:10:49 CET schrieb Herbert Xu:
Hi Herbert,
>
> It sort of worked for skcipher because it didn't care if ctx->enc
> or even ctx->iv changed midstream. But even there I don't think
> we need to wait a second time. In fact waiting a second time could
> result in
Am Mittwoch, 29. November 2017, 08:10:49 CET schrieb Herbert Xu:
Hi Herbert,
>
> But anyway this isn't suitable for stable where we should just fix
> it by making it not crash.
I will send a patch right away moving the wait out.
Later on I will elaborate on your suggestion to move the context-
On Wed, Nov 29, 2017 at 07:48:53AM +0100, Stephan Mueller wrote:
> Am Mittwoch, 29. November 2017, 00:02:40 CET schrieb Herbert Xu:
>
> > This is wrong. You can't fetch ctx->enc before you wait. It has
> > to be done after the wait as otherwise ctx->enc may not even have
> > been initialised.
>
Am Mittwoch, 29. November 2017, 00:02:40 CET schrieb Herbert Xu:
Hi Herbert,
> > --- a/crypto/algif_aead.c
> > +++ b/crypto/algif_aead.c
> > @@ -110,6 +110,7 @@ static int _aead_recvmsg(struct socket *sock, struct
> > msghdr *msg,>
> > size_t outlen = 0; /* [out] RX bufs produce
On Tue, Nov 28, 2017 at 10:33:09PM +0100, Stephan Müller wrote:
> Hi Herbert,
>
> I verified the correctnes of the patch with Eric's test program.
> Without the patch, the issue is present. With the patch, the kernel
> happily lives ever after.
>
> Changes v2: change the submission into a proper
On Tue, Nov 28, 2017 at 10:33:09PM +0100, Stephan Müller wrote:
> Hi Herbert,
>
> I verified the correctnes of the patch with Eric's test program.
> Without the patch, the issue is present. With the patch, the kernel
> happily lives ever after.
>
> Changes v2: change the submission into a proper
Hi Herbert,
I verified the correctnes of the patch with Eric's test program.
Without the patch, the issue is present. With the patch, the kernel
happily lives ever after.
Changes v2: change the submission into a proper patch
Ciao
Stephan
---8<---
The function af_alg_get_rsgl may sleep to wait