From: Herbert Xu <herbert@gondor.apana.org.au>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
akpm@osdl.org
Subject: Re: [PATCH] crypto: add alignment handling to digest layer
Date: Thu, 6 Apr 2006 04:05:20 +1000 [thread overview]
Message-ID: <20060405180520.GA15151@gondor.apana.org.au> (raw)
In-Reply-To: <20060404.000407.41198995.anemo@mba.ocn.ne.jp>
On Tue, Apr 04, 2006 at 12:04:07AM +0900, Atsushi Nemoto wrote:
>
> @@ -38,12 +39,24 @@ static void update(struct crypto_tfm *tf
> unsigned int bytes_from_page = min(l, ((unsigned int)
> (PAGE_SIZE)) -
> offset);
> - char *p = crypto_kmap(pg, 0) + offset;
> + char *src = crypto_kmap(pg, 0);
> + char *p = src + offset;
>
> + if (unlikely(offset & alignmask)) {
> + unsigned int bytes =
> + alignmask + 1 - (offset & alignmask);
> + bytes = min(bytes, bytes_from_page);
> + tfm->__crt_alg->cra_digest.dia_update
> + (crypto_tfm_ctx(tfm), p,
> + bytes);
Don't we need to copy this to an aligned buffer?
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2006-04-05 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 3:36 [PATCH] crypto: add alignment handling to digest layer Atsushi Nemoto
2006-04-03 15:04 ` Atsushi Nemoto
2006-04-03 21:21 ` Herbert Xu
2006-04-05 18:05 ` Herbert Xu [this message]
2006-04-06 2:37 ` Atsushi Nemoto
2006-04-06 23:24 ` Herbert Xu
2006-04-07 5:27 ` Atsushi Nemoto
2006-04-07 5:49 ` Herbert Xu
2006-04-09 22:45 ` 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=20060405180520.GA15151@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=akpm@osdl.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@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.