[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100602.071510.255391809.davem@davemloft.net>
Date: Wed, 02 Jun 2010 07:15:10 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: xiaosuo@...il.com
Cc: hadi@...erus.ca, netdev@...r.kernel.org
Subject: Re: [PATCH v2] cls_u32: use skb_header_pointer() to dereference
data safely
From: Changli Gao <xiaosuo@...il.com>
Date: Wed, 2 Jun 2010 22:00:36 +0800
> use skb_header_pointer() to dereference data safely
>
> the original skb->data dereference isn't safe, as there isn't any skb->len or
> skb_is_nonlinear() check. skb_header_pointer() is used instead in this patch.
> And when the skb isn't long enough, we terminate the function u32_classify()
> immediately with -1. Unaligned access is also fixed.
>
> Signed-off-by: Changli Gao <xiaosuo@...il.com>
Please don't do so many things at once Changli.
Everything is fine except the get_unaligned() addition. It's
intentionally not there, and by adding the get_unaligned() you're
going to kill performance as this expands to 4 byte loads per u32 key
check on RISC systems.
If it's not aligned, that's a path or configuration that will need to
be fixed up such that the accesses are aligned.
Please respin this patch with the get_unaligned() part removed.
Thanks.
--
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