linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tadeusz Struk <tadeusz.struk@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] crypto: algif - Mark sgl end at the end of data.
Date: Tue, 25 Nov 2014 07:53:39 -0800	[thread overview]
Message-ID: <5474A603.4040705@intel.com> (raw)
In-Reply-To: <20141125144245.GA8278@gondor.apana.org.au>

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

  reply	other threads:[~2014-11-25 15:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 17:14 [PATCH] crypto: algif - Mark sgl end at the end of data Tadeusz Struk
2014-11-25 14:42 ` Herbert Xu
2014-11-25 15:53   ` Tadeusz Struk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-28 18:40 Tadeusz Struk
2014-12-01 14:40 ` Herbert Xu
2014-12-01 14:53   ` Tadeusz Struk
2014-12-01 15:00     ` Herbert Xu
2014-12-01 15:03       ` Tadeusz Struk
2014-12-02 14:33         ` Herbert Xu
2014-12-02 15:06           ` Tadeusz Struk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5474A603.4040705@intel.com \
    --to=tadeusz.struk@intel.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).