All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Stephan Mueller <smueller@chronox.de>,
	"Dey, Megha" <megha.dey@intel.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: sha1_mb broken
Date: Tue, 04 Oct 2016 09:08:42 -0700	[thread overview]
Message-ID: <1475597322.3916.283.camel@linux.intel.com> (raw)
In-Reply-To: <2176107.gSz0A05ekE@tauon.atsec.com>

On Tue, 2016-10-04 at 16:10 +0200, Stephan Mueller wrote:
> Am Dienstag, 4. Oktober 2016, 00:25:07 CEST schrieb Dey, Megha:
> 
> Hi Megha,
> 
> > 
> > 
> > > 
> > > Hi Stephan,
> > > 
> > > Your test code initialized the completion structure incorrectly, that led
> > > to the missing completion from being received. The init_completion call
> > > should be made before the crypto_ahash_digest call. The following change
> Thanks a lot for pointing that one out. Can you help me understand why your 
> code trips over that issue whereas other ahash implementations do not (all 
> other SHA-1 or SHA-2 implementations work perfectly fine with that code)?
> 

There is a spin lock protecting the completion's wait_queue on the processes waiting for
the completion of the job, and the queue head.  My suspicion is if these
structures are not initialized properly, we fail to look up the waiting process in the queue
properly to call it.  For the other tested cases, they may not be a true ahash operation
in the sense of passing request through the crypto daemon, and have to context switch
to let crypto daemon complete the job.  The computation proceeds
and returns in the same call chain.

Thanks.

Tim

  reply	other threads:[~2016-10-04 16:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26  1:15 sha1_mb broken Stephan Mueller
2016-09-26 17:32 ` Stephan Mueller
2016-09-28 17:58   ` Megha Dey
2016-09-28 18:25     ` Megha Dey
2016-09-28 18:45       ` Stephan Mueller
2016-09-28 22:52         ` Dey, Megha
2016-09-29  5:30           ` Stephan Mueller
2016-10-04  0:25             ` Dey, Megha
2016-10-04 14:10               ` Stephan Mueller
2016-10-04 16:08                 ` Tim Chen [this message]
2016-10-04 16:27                   ` Stephan Mueller

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=1475597322.3916.283.camel@linux.intel.com \
    --to=tim.c.chen@linux.intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=megha.dey@intel.com \
    --cc=smueller@chronox.de \
    /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.