[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 10 Oct 2014 08:36:16 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: alexander.duyck@...il.com
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH v2] flow-dissector: Fix alignment issue in
__skb_flow_get_ports
On Fri, 2014-10-10 at 07:59 -0700, alexander.duyck@...il.com wrote:
> From: Alexander Duyck <alexander.h.duyck@...hat.com>
>
> This patch addresses a kernel unaligned access bug seen on a sparc64 system
> with an igb adapter. Specifically the __skb_flow_get_ports was returning a
> be32 pointer which was then having the value directly returned.
>
> In order to keep the handling of the ports consistent with how we were
> handling the IPv4 and IPv6 addresses I have instead replaced the assignment
> with a memcpy to the flow key ports value. This way it should stay a
> memcpy on systems that cannot handle unaligned access, and will likely be
> converted to a 32b assignment on the systems that can support it.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...hat.com>
> ---
I believe you also need to take care of calls to ipv6_addr_hash()
The IPv4 part also needs something in iph_to_flow_copy_addrs(),
otherwise compiler might assume &iph->saddr is word aligned.
--
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