On 07/12/18 11:14 AM, Vakul Garg wrote: > Hi Boris > > Thanks for explaining. > Few questions/observations. > > 1. Isn't ' ctx->decrypted = true' a redundant statement in > tls_do_decryption()? > The same has been repeated in tls_recvmsg() after calling decrypt_skb()? > > 2. Similarly, ctx->saved_data_ready(sk) seems not required in > tls_do_decryption(). > This is because tls_do_decryption() is already triggered from tls_recvmsg() > i.e. from user space app context. > > 3. In tls_queue(), I think strp->sk->sk_state_change() needs to be replaced > with ctx->saved_data_ready().
Yes, I think these 3 can all be changed. #2 would be required if do_decryption ever is called not in user context, but that's not the case currently.