linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Szilveszter Ordog <slipszi@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: ahash - Fix handling of unaligned buffers
Date: Wed, 3 Mar 2010 00:10:19 +0100	[thread overview]
Message-ID: <ac67d9131003021510n47414dewf36d359a315115aa@mail.gmail.com> (raw)
In-Reply-To: <20100302143731.GA4120@gondor.apana.org.au>

> When we get an unaligned buffer, we first process the bit from the
> start to the first aligned address.  Once we get to the aligned
> address everything happens as usual.
>
> So where this code is, we're trying to move to the next aligned
> address, and as ALIGN rounds down, we need to add alignmask.
> So the bug is the fact that we're adding alignmask - 1.

No, ALIGN rounds *up* (as it should). See:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/kernel.h#l40

Best regards,
Szilveszter
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-03-02 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 11:50 [PATCH] crypto: ahash - Fix handling of unaligned buffers Szilveszter Ordog
2010-03-02 14:37 ` Herbert Xu
2010-03-02 23:10   ` Szilveszter Ordog [this message]
2010-03-03  0:04     ` Herbert Xu
2010-03-04  0:48       ` Szilveszter Ordog

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=ac67d9131003021510n47414dewf36d359a315115aa@mail.gmail.com \
    --to=slipszi@gmail.com \
    --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).