From: Andi Kleen <andi@firstfloor.org>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <andi@firstfloor.org>,
lkml <linux-kernel@vger.kernel.org>,
akpm <akpm@linux-foundation.org>,
sam@ravnborg.org, davem@davemloft.net
Subject: Re: [PATCH] make csum_partial obj-y
Date: Tue, 3 Apr 2007 21:23:49 +0200 [thread overview]
Message-ID: <20070403192349.GA24243@one.firstfloor.org> (raw)
In-Reply-To: <4612A66D.5090009@oracle.com>
On Tue, Apr 03, 2007 at 12:09:33PM -0700, Randy Dunlap wrote:
> Andi Kleen wrote:
> >Randy Dunlap <randy.dunlap@oracle.com> writes:
> >
> >>From: Randy Dunlap <randy.dunlap@oracle.com>
> >>
> >>Fixes kernel bugzilla #8242:
> >>
> >>Move csum_partial() from lib-y to obj-$(CONFIG_CSUM_PARTIAL)
> >>so that modules can use it.
> >>
> >>CONFIG_BLK_DEV_MD (md/raid driver) needs csum_partial(),
> >>even when CONFIG_NET=n and BLK_DEV_MD=m, so build it as an
> >>object to force it being built and available.
> >>
> >>REISERFS with XATTR=y also needs csum_partial(), so that
> >>is enforced here.
> >
> >They are all broken because csum_partial gives different values
> >on different architectures. You're just extending that to
> >possibly more subsystems.
>
> So the ones that can be localized (BLK_DEV_MD and REISERFS)
> should have their own versions?
They would need some compat code to still be able to read
old versions and a new format that is portable.
Currently it means you likely have architecture specific MD
and reiserfs data structures on disk which is broken.
BTW It might be better to just switch to a stronger checksum.
The TCP checksum is quite weak and we already have CRC functions.
> How does the networking code work across multiple architectures?
It folds the csum_partial output together with a pseudo header
into the final checksum. Just skipping the folding step is broken
because the presentation before that is architecture specific.
e.g. some hold it in 32bit and others in 64bit.
-Andi
next prev parent reply other threads:[~2007-04-03 19:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 18:26 [PATCH] make csum_partial obj-y Randy Dunlap
2007-04-03 20:02 ` Andi Kleen
2007-04-03 19:09 ` Randy Dunlap
2007-04-03 19:23 ` Andi Kleen [this message]
2007-04-03 19:27 ` David Miller
2007-04-03 19:31 ` Randy Dunlap
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=20070403192349.GA24243@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sam@ravnborg.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