linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>, <davem@davemloft.net>
Subject: Re: [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list
Date: Thu, 28 May 2015 12:30:15 -0500	[thread overview]
Message-ID: <556750A7.6020003@amd.com> (raw)
In-Reply-To: <20150528003612.GA2739@gondor.apana.org.au>

On 05/27/2015 07:36 PM, Herbert Xu wrote:
> On Wed, May 27, 2015 at 09:12:02AM -0500, Tom Lendacky wrote:
>>
>>> The reason I'm asking is because while this patch fixes your driver
>>> everybody else will still crash and burn should something like this
>>> happen again.
>>
>> A number of other drivers already have similar sg-count functions in
>> them.
>
> Perhaps you can help abstract this into a helper that everybody can
> call?

I can do that.  Something like an sg_nents_for_len() function that takes
an sg pointer and a u64 length as arguments. The function should also
return an error if the length requirement isn't satisfied.

Thanks,
Tom

>
> Cheers,
>

  reply	other threads:[~2015-05-28 17:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 18:06 [PATCH v1 0/3] crypto: ccp - CCP driver updates 2015-05-26 Tom Lendacky
2015-05-26 18:06 ` [PATCH v1 1/3] crypto: ccp - Remove manual check and set of dma_mask pointer Tom Lendacky
2015-05-26 18:06 ` [PATCH v1 2/3] crypto: ccp - Remove unused structure field Tom Lendacky
2015-05-26 18:06 ` [PATCH v1 3/3] crypto: ccp - Protect against poorly marked end of sg list Tom Lendacky
2015-05-27  9:43   ` Herbert Xu
2015-05-27  9:45     ` Herbert Xu
2015-05-27 14:15       ` Tom Lendacky
2015-05-27 14:12     ` Tom Lendacky
2015-05-28  0:36       ` Herbert Xu
2015-05-28 17:30         ` Tom Lendacky [this message]
2015-05-27  9:55 ` [PATCH v1 0/3] crypto: ccp - CCP driver updates 2015-05-26 Herbert Xu

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=556750A7.6020003@amd.com \
    --to=thomas.lendacky@amd.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).