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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ