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  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, 28 Feb 2007 22:48:39 +0100
From:	Francois Romieu <romieu@...zoreil.com>
To:	Philip Craig <philipc@...pgear.com>
Cc:	Mike Isely <isely@...ox.com>, Jeff Garzik <jeff@...zik.org>,
	netdev@...r.kernel.org
Subject: Re: [PATCH 4/5] r8169: more alignment for the 0x8168

Sorry for the delay, I took some time to check the history of the
r8169 alignment issues.

Philip Craig <philipc@...pgear.com> :
[...]
> This only partially helps.  Many of the packets are greater than 200
> bytes so copybreak doesn't apply to them.

Yes.

> Can we assume anything about the alignment of skb->data?  I think it
> should be 4 byte aligned, otherwise the whole NET_IP_ALIGN thing
> won't work.  All the drivers I looked at just reserve NET_IP_ALIGN
> without checking the alignment first.
> 
> So can you do something like set align to 0 for RTL_CFG_0 and change
> rtl8169_alloc_rx_skb() to:
> 	skb_reserve(skb, align ? (align - 1) & (u32)skb->data : NET_IP_ALIGN);

The "So" part assumes that the 0x8169 can DMA at any address.

/me ponders...

It's easy to debug if it misbehaves now or in 6 months on some obscure
system. It's consistent with the preprevious code. Ok, good idea, I like it.

[...]
> BTW, should the alignment expression be:
> 	(((u32)skb->data + (align - 1)) & ~(align - 1)) - (u32)skb->data

I'll see if something can be hacked with a zero or power of two alignment.

-- 
Ueimor
-
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