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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070726020431.1e693866.akpm@linux-foundation.org>
Date:	Thu, 26 Jul 2007 02:04:31 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
Cc:	Adrian Bunk <bunk@...sta.de>,
	Robert Olsson <Robert.Olsson@...a.slu.se>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>, Josh Triplett <josh@...nel.org>,
	netdev@...r.kernel.org
Subject: Re: [RFT] fib_trie: cleanup

On Thu, 26 Jul 2007 09:46:48 +0100 Stephen Hemminger <shemminger@...ux-foundation.org> wrote:

> Try this out:
>      * replace macro's with inlines
>      * get rid of places doing multiple evaluations of NODE_PARENT

And it fixes the rcu abuse which resulted in
http://lkml.org/lkml/2007/7/25/319.  Which I assume is what inspired the
effort.


your typecasting style is inconsistent:

> +	return rcu_dereference((struct tnode *) (node->parent & ~NODE_TYPE_MASK));

space

> +			   (unsigned long)ptr | NODE_TYPE(node));

no space

> +	while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) {

no space

> +		tp = node_parent((struct node *) tn);

space

> +		node_set_parent((struct node *)l, tp);

no space

> +		node_set_parent((struct node *)tn, tp);

no space

> +			struct tnode *parent = node_parent((struct node *) pn);

space

etc.


"no space" seems to be more usual, by about a 50.1:49.9 ratio.  It is
a lot more common in net/:

box:/usr/src/25> grep '[(]unsigned long[)] ' net/*/*.c  | wc -l
91
box:/usr/src/25> grep '[(]unsigned long[)][^ ]' net/*/*.c  | wc -l 
242

-
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