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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240802144025.GC2504122@kernel.org>
Date: Fri, 2 Aug 2024 15:40:25 +0100
From: Simon Horman <horms@...nel.org>
To: Moon Yeounsu <yyyynoom@...il.com>
Cc: cooldavid@...ldavid.org, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: use ip_hdrlen() instead of bit shift

On Fri, Aug 02, 2024 at 03:15:34PM +0100, Simon Horman wrote:
> On Fri, Aug 02, 2024 at 02:44:21PM +0900, Moon Yeounsu wrote:
> > `ip_hdr(skb)->ihl << 2` are the same as `ip_hdrlen(skb)`
> > Therefore, we should use a well-defined function not a bit shift
> > to find the header length.
> > 
> > It also compress two lines at a single line.
> > 
> > Signed-off-by: Moon Yeounsu <yyyynoom@...il.com>
> 
> Firstly, I think this clean-up is both correct and safe.  Safe because
> ip_hdrlen() only relies on ip_hdr(), which is already used in the same code
> path. And correct because ip_hdrlen multiplies ihl by 4, which is clearly
> equivalent to a left shift of 2 bits.
> 
> However, I do wonder about the value of clean-ups for what appears to be a
> very old driver, which hasn't received a new feature for quite sometime
> 
> And further, I wonder if we should update this driver from "Maintained" to
> "Odd Fixes" as the maintainer, "Guo-Fu Tseng" <cooldavid@...ldavid.org>,
> doesn't seem to have been seen by lore since early 2020.
> 
> https://lore.kernel.org/netdev/20200219034801.M31679@cooldavid.org/

By "Odd Fixes" I meant "Orphan"

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ