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:	Wed, 11 Jul 2007 17:45:11 +0400
From:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Richard Henderson <rth@...ddle.net>, netdev@...r.kernel.org,
	jailbird@...atraz.fdf.net,
	"bugme-daemon@...nel-bugs.osdl.org" 
	<bugme-daemon@...nel-bugs.osdl.org>
Subject: Re: [Bugme-new] [Bug 8724] New: Unaligned acess in udp_recvmsg() on EV56

On Sun, Jul 08, 2007 at 03:29:35PM -0700, Andrew Morton wrote:
> > This problem does NOT seem to affect my Tsunami/Shark (EV68AL) box running the
> > same kernel version on the same LAN.  Not sure if it's CPU generation related
> > (EV5 vs EV6), or if it's the NIC (via_rhine on the EV5 vs e100 on the EV6).

It is the NIC, I suppose.

> I don't think there's necessarily a bug here: that's just the kernel
> telling us that there are unaligned accesses which got successfully
> fixed up, so we're being perhaps a bit inefficient.  Yes?

Sort of. It's not exactly a bug, just an old and well known problem
with ethernet controllers that can do DMA only at 32-bit boundaries,
so the IP headers are not properly aligned. A workaround is to
disable "rx_copybreak" feature, either by passing "rx_copybreak=1536"
to the driver, or add #ifdef to via_rhine.c, like tulip, starfire and
many other drivers have:

/*
 * Set the copy breakpoint for the copy-only-tiny-frames scheme.
 * Setting to > 1518 effectively disables this feature.
 *
 * NOTE:
 * The ia64 doesn't allow for unaligned loads even of integers being
 * misaligned on a 2 byte boundary. Thus always force copying of
 * packets as the starfire doesn't allow for misaligned DMAs ;-(
 * 23/10/2000 - Jes
 *
 * The Alpha and the Sparc don't like unaligned loads, either. On Sparc64,
 * at least, having unaligned frames leads to a rather serious performance
 * penalty. -Ion
 */
#if defined(__ia64__) || defined(__alpha__) || defined(__sparc__)
static int rx_copybreak = PKT_BUF_SZ;
#else
static int rx_copybreak /* = 0 */;
#endif

Ivan.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ