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] [day] [month] [year] [list]
Message-ID: <4F198882.6030709@enea.com>
Date:	Fri, 20 Jan 2012 16:30:10 +0100
From:	Arvid Brodin <arvid.brodin@...a.com>
To:	Eric Dumazet <eric.dumazet@...il.com>,
	Johannes Berg <johannes@...solutions.net>
CC:	<netdev@...r.kernel.org>
Subject: Re: HSR: Standard breaks alignment. Solution?

Eric Dumazet wrote:
> Le mardi 17 janvier 2012 à 09:04 +0100, Johannes Berg a écrit :
>> On Tue, 2012-01-17 at 00:10 +0100, Arvid Brodin wrote:
>>> As I've written before here, I'm trying to add support for the HSR protocol
>>> ("High-availability Seamless Redundancy") to the linux kernel. The protocol is
>>> specified in IEC-62439-3, and involves adding a protocol tag after the ethhdr
>>> on outgoing frames, and stripping it again on reception, much like VLAN.
>>>
>>> This HSR tag is 6 bytes long, which breaks 32-bit header alignment and causes
>>> an Oops and a kernel panic in icmp_echo on the receiving side of pings (here,
>>> exactly: http://lxr.linux.no/#linux+v2.6.37/net/ipv4/icmp.c#L838 )
>>>
>>> If I add two bytes of padding to the HSR tag everything works beautifully. But
>>> of course that breaks any pretense of standard compliance.
>>>
>>> Is there some way to fix this without having to memmove the whole frame payload
>>> 2 bytes on reception?
>> I don't think there's any other choice, but you can use
>> CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to see whether you actually need
>> to do it.
> 
> Or test if NET_IP_ALIGN is 0, it might be more explicit.
> 

Thanks guys!

-- 
Arvid Brodin
Enea Services Stockholm AB
--
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