lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090116015356.GA9822@gondor.apana.org.au>
Date:	Fri, 16 Jan 2009 12:53:57 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Huang Ying <ying.huang@...el.com>
Cc:	roel kluin <roel.kluin@...il.com>,
	Sebastian Siewior <linux-crypto@...breakpoint.cc>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>
Subject: Re: [PATCH crypto -v4 2/2] AES-NI: Add support to Intel AES-NI
	instructions for x86_64 platform

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@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ