Re: [PATCH] crypto: algif - Mark sgl end at the end of data.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Herbert,
On 11/25/2014 06:42 AM, Herbert Xu wrote:
> Please put these clean-ups in a separate patch.
Ok, will do.

> 
>> > @@ -469,6 +464,7 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,
>> >  			if (!used)
>> >  				goto free;
>> >  
>> > +			sg_mark_end(&sg[sgl->cur - 1]);
> I don't think this will work as if we only partially use up the
> SGs and MSG_MORE is set then bad things will happen to the next
> send call on the socket.

Yes, I see now. I assumed that the user would want to read the same len
that was first sent and thus the skcipher_pull_sgl() would clean the
whole ctx->tsgl and then skcipher_alloc_sgl() would create a new one.
I'll see if something else can be done to mark the end of data.
Thanks,
Tadeusz
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux