From: David Miller <davem@davemloft.net>
To: sandeen@sandeen.net
Cc: matorola@gmail.com, sparclinux@vger.kernel.org,
linux-xfs@vger.kernel.org
Subject: Re: [sparc64] crc32c misbehave
Date: Thu, 01 Jun 2017 21:57:11 -0400 (EDT) [thread overview]
Message-ID: <20170601.215711.1719799806113363582.davem@davemloft.net> (raw)
In-Reply-To: <20170601.174419.2151404855471358626.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Thu, 01 Jun 2017 17:44:19 -0400 (EDT)
> Ok, I can reproduce this bug on my systems. I'll see if I can figure out
> what is going on.
So I've done several tests to try and narrow down the cause.
First, I implemented crc32c() inside of the test module, doing
exactly the same thing that lib/libcrc32c.c is doing. So this
make it use a separate tfm.
This never fails.
Then, I implemented a separate module "davem_crc32c.ko" that is
identical to lib/libcrc32.c except it uses it's own 'tfm' and it
exports the symbol davem_crc32c() instead of crc32c(). And finally I
adjust the test case to call davem_crc32c() instead of crc32c().
This also never fails.
So it only fails if we use the lib/libcrc32.c shared with the rest of
the kernel.
I really can't figure out yet why this sharing can even matter. The
per-computation state is all in the on-stack 'shash':
SHASH_DESC_ON_STACK(shash, tfm);
So invocations of crc32c() should not be able to corrupt the state of
other parallel invocations.
I'll keep digging, but that is where I am right now.
next prev parent reply other threads:[~2017-06-02 1:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CADxRZqzgaL4ew6PVek3WBsdwo6GcT0ORx=7h+6p0V3NAr8qF+w@mail.gmail.com>
[not found] ` <CADxRZqzNTB1n0g1r_2rLsjifHpJ+_x1WPxNOSqEcHbi74jHi5w@mail.gmail.com>
[not found] ` <20170531.115335.213691069712156732.davem@davemloft.net>
2017-05-31 16:19 ` [sparc64] crc32c misbehave Eric Sandeen
2017-05-31 16:31 ` Eric Sandeen
2017-05-31 16:49 ` David Miller
2017-06-01 21:44 ` David Miller
2017-06-02 1:57 ` David Miller [this message]
2017-06-02 2:10 ` Eric Sandeen
2017-06-02 3:33 ` David Miller
2017-06-02 3:34 ` Eric Sandeen
2017-06-06 19:05 ` David Miller
2017-06-06 19:09 ` Eric Sandeen
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=20170601.215711.1719799806113363582.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-xfs@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).