linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac
@ 2015-07-20  7:54 Sowmini Varadhan
  2015-07-20  8:04 ` Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sowmini Varadhan @ 2015-07-20  7:54 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: davem, therbert, marcelo.leitner, nicolas.dichtel, tgraf, jiri,
	jbenc, azhou, jesse, sowmini.varadhan


__vxlan_find_mac invokes ether_addr_equal on the eth_addr field,
which triggers unaligned access messages, so rearrange vxlan_fdb
to avoid this in the most non-intrusive way.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
v2: Alexander Duyck comments: place eth_addr[] to be 64b aligned

 drivers/net/vxlan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 34c519e..ec86a11 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -106,9 +106,9 @@ struct vxlan_fdb {
 	unsigned long	  updated;	/* jiffies */
 	unsigned long	  used;
 	struct list_head  remotes;
+	u8		  eth_addr[ETH_ALEN];
 	u16		  state;	/* see ndm_state */
 	u8		  flags;	/* see ndm_flags */
-	u8		  eth_addr[ETH_ALEN];
 };
 
 /* Pseudo network device */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac
  2015-07-20  7:54 [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac Sowmini Varadhan
@ 2015-07-20  8:04 ` Jiri Pirko
  2015-07-20 14:07 ` Marcelo Ricardo Leitner
  2015-07-21  7:12 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2015-07-20  8:04 UTC (permalink / raw)
  To: Sowmini Varadhan
  Cc: netdev, linux-kernel, davem, therbert, marcelo.leitner,
	nicolas.dichtel, tgraf, jbenc, azhou, jesse

Mon, Jul 20, 2015 at 09:54:50AM CEST, sowmini.varadhan@oracle.com wrote:
>
>__vxlan_find_mac invokes ether_addr_equal on the eth_addr field,
>which triggers unaligned access messages, so rearrange vxlan_fdb
>to avoid this in the most non-intrusive way.
>
>Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

Reviewed-by: Jiri Pirko <jiri@resnulli.us>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac
  2015-07-20  7:54 [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac Sowmini Varadhan
  2015-07-20  8:04 ` Jiri Pirko
@ 2015-07-20 14:07 ` Marcelo Ricardo Leitner
  2015-07-21  7:12 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Ricardo Leitner @ 2015-07-20 14:07 UTC (permalink / raw)
  To: Sowmini Varadhan
  Cc: netdev, linux-kernel, davem, therbert, nicolas.dichtel, tgraf,
	jiri, jbenc, azhou, jesse

On Mon, Jul 20, 2015 at 09:54:50AM +0200, Sowmini Varadhan wrote:
> 
> __vxlan_find_mac invokes ether_addr_equal on the eth_addr field,
> which triggers unaligned access messages, so rearrange vxlan_fdb
> to avoid this in the most non-intrusive way.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac
  2015-07-20  7:54 [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac Sowmini Varadhan
  2015-07-20  8:04 ` Jiri Pirko
  2015-07-20 14:07 ` Marcelo Ricardo Leitner
@ 2015-07-21  7:12 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-07-21  7:12 UTC (permalink / raw)
  To: sowmini.varadhan
  Cc: netdev, linux-kernel, therbert, marcelo.leitner, nicolas.dichtel,
	tgraf, jiri, jbenc, azhou, jesse

From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Mon, 20 Jul 2015 09:54:50 +0200

> 
> __vxlan_find_mac invokes ether_addr_equal on the eth_addr field,
> which triggers unaligned access messages, so rearrange vxlan_fdb
> to avoid this in the most non-intrusive way.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
> v2: Alexander Duyck comments: place eth_addr[] to be 64b aligned

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-21  7:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20  7:54 [PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac Sowmini Varadhan
2015-07-20  8:04 ` Jiri Pirko
2015-07-20 14:07 ` Marcelo Ricardo Leitner
2015-07-21  7:12 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).