lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Apr 2007 21:23:49 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	lkml <linux-kernel@...r.kernel.org>,
	akpm <akpm@...ux-foundation.org>, sam@...nborg.org,
	davem@...emloft.net
Subject: Re: [PATCH] make csum_partial obj-y

On Tue, Apr 03, 2007 at 12:09:33PM -0700, Randy Dunlap wrote:
> Andi Kleen wrote:
> >Randy Dunlap <randy.dunlap@...cle.com> writes:
> >
> >>From: Randy Dunlap <randy.dunlap@...cle.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ