From: Herbert Xu <herbert@gondor.apana.org.au>
To: Huang Ying <ying.huang@intel.com>
Cc: roel kluin <roel.kluin@gmail.com>,
Sebastian Siewior <linux-crypto@ml.breakpoint.cc>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH crypto -v4 2/2] AES-NI: Add support to Intel AES-NI instructions for x86_64 platform
Date: Fri, 16 Jan 2009 12:53:57 +1100 [thread overview]
Message-ID: <20090116015356.GA9822@gondor.apana.org.au> (raw)
In-Reply-To: <1232068858.5937.222.camel@yhuang-dev.sh.intel.com>
On Fri, Jan 16, 2009 at 09:20:58AM +0800, Huang Ying wrote:
> On Thu, 2009-01-15 at 17:47 +0800, roel kluin wrote:
>
> > > + kernel_fpu_begin();
> > > + while ((nbytes = walk.nbytes)) {
> > > + aesni_ecb_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr,
> > > + nbytes & AES_BLOCK_MASK);
> > > + nbytes &= AES_BLOCK_SIZE - 1;
> > > + err = blkcipher_walk_done(desc, &walk, nbytes);
> > > + }
> > > + kernel_fpu_end();
> > > +
> > > + return err;
> > > +}
> >
> > if blkcipher_walk_{virt,done} returns an error, don't we have to break
> > out of the loop?
> > i.e.
> >
> > while (!err && (nbytes = walk.nbytes))
> >
> > (if that's erroneous, it occurs in other places as well)
That's not necessary because blkcipher_walk_done will ensure
that walk.nbytes == 0 if there is an error.
Cheers,
--
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:[~2009-01-16 1:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 8:28 Huang Ying
[not found] ` <25e057c00901150147t570d8ab6g3b2b99c60f10c3c2@mail.gmail.com>
2009-01-16 1:20 ` Huang Ying
2009-01-16 1:53 ` Herbert Xu [this message]
2009-01-16 2:37 ` Huang Ying
2009-01-16 3:26 ` Herbert Xu
2009-01-16 3:37 ` Huang Ying
2009-01-16 3:41 ` 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=20090116015356.GA9822@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=linux-crypto@ml.breakpoint.cc \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
--cc=ying.huang@intel.com \
/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
all inboxes | Powered by JetHome®