From: David Miller <davem@davemloft.net>
To: matorola@gmail.com
Cc: sparclinux@vger.kernel.org, sandeen@sandeen.net,
linux-crypto@vger.kernel.org
Subject: Re: [sparc64] crc32c misbehave
Date: Wed, 31 May 2017 12:03:30 -0400 (EDT) [thread overview]
Message-ID: <20170531.120330.169342845867105735.davem@davemloft.net> (raw)
In-Reply-To: <20170531.115335.213691069712156732.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 31 May 2017 11:53:35 -0400 (EDT)
> Can you try something like disabling cpu IRQs around the crc32c() function
> in lib/libcrc32c.c? Something like:
>
> u32 retval;
>
> local_irq_disable();
>
> shash->tfm = tfm;
> shash->flags = 0;
> *ctx = crc;
>
> err = crypto_shash_update(shash, address, length);
> BUG_ON(err);
>
> retval = *ctx;
>
> local_irq_enable();
>
> return retval;
Actually you would need a spinlock, with IRQs disabled, to properly test
this theory since the TFM is shared across the entire system.
The really suspicious part of your test results is that the corrupted
checksum always evaluates to zero.
prev parent reply other threads:[~2017-05-31 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CADxRZqzgaL4ew6PVek3WBsdwo6GcT0ORx=7h+6p0V3NAr8qF+w@mail.gmail.com>
2017-05-31 11:56 ` [sparc64] crc32c misbehave Anatoly Pugachev
2017-05-31 12:12 ` Anatoly Pugachev
2017-05-31 15:53 ` David Miller
2017-05-31 16:03 ` David Miller [this message]
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=20170531.120330.169342845867105735.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=matorola@gmail.com \
--cc=sandeen@sandeen.net \
--cc=sparclinux@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).