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:	Mon, 18 Oct 2010 11:44:55 -0700
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Shreyas Bhatewara <sbhatewara@...are.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"shemminger@...tta.com" <shemminger@...tta.com>
Subject: Re: [PATCH] vmxnet3: remove set_flag_le{16,64} functions

On Sat, Oct 16, 2010 at 8:57 AM, Shreyas Bhatewara
<sbhatewara@...are.com> wrote:
> This hunk is wrong, UPT1_F_RXVLAN should be reset here.
>
> I fail to understand why set/reset functions were not good enough and why this opencoding is required. I agree with your earlier suggestion about replacing two conversions with *data |= cpu_to_le16(flag); though.
>
>

There's nothing really _wrong_ with them, they are a bit special-case,
and they are incomplete in that there is only 16/64 and
no 32 bit version.  And the naming is usually set/clear rather than set/reset.

That, and they are used so infrequently, why not just define the
constants as little endian and then it's just
use regular bitwise math which is common everywhere in networking?
Then others reading your driver don't have
to go look at a special-case set/reset function...it's just or'ing a flag.

I'll send a patch this evening so you can see what it would look like.

Harvey
--
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