All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Fernandes <joelf@ti.com>
To: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH] crypto: omap-sham: Map SG pages if they are HIGHMEM before accessing
Date: Fri, 14 Feb 2014 13:53:13 -0600	[thread overview]
Message-ID: <52FE7429.608@ti.com> (raw)
In-Reply-To: <1390952600-29913-1-git-send-email-joelf@ti.com>

Gentle ping for this fix patch. Could it be accepted for -rc? Thanks.

-Joel

On 01/28/2014 05:43 PM, Joel Fernandes wrote:
> HIGHMEM pages may not be mapped so we must kmap them before accessing.
> This resolves a random OOPs error that was showing up during OpenSSL SHA tests.
> 
> Signed-off-by: Joel Fernandes <joelf@ti.com>
> ---
>  drivers/crypto/omap-sham.c |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index 8bdde57..fcf6562 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -636,11 +636,21 @@ static size_t omap_sham_append_buffer(struct omap_sham_reqctx *ctx,
>  static size_t omap_sham_append_sg(struct omap_sham_reqctx *ctx)
>  {
>  	size_t count;
> +	const u8 *vaddr;
>  
>  	while (ctx->sg) {
> +		if (PageHighMem(sg_page(ctx->sg)))
> +			vaddr = kmap_atomic(sg_page(ctx->sg));
> +		else
> +			vaddr = sg_virt(ctx->sg);
> +
>  		count = omap_sham_append_buffer(ctx,
> -				sg_virt(ctx->sg) + ctx->offset,
> +				vaddr + ctx->offset,
>  				ctx->sg->length - ctx->offset);
> +
> +		if (PageHighMem(sg_page(ctx->sg)))
> +			kunmap_atomic((void *)vaddr);
> +
>  		if (!count)
>  			break;
>  		ctx->offset += count;
> 

      reply	other threads:[~2014-02-14 19:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 23:43 [PATCH] crypto: omap-sham: Map SG pages if they are HIGHMEM before accessing Joel Fernandes
2014-02-14 19:53 ` Joel Fernandes [this message]

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=52FE7429.608@ti.com \
    --to=joelf@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.