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]
Date:	Tue, 12 Feb 2008 18:35:21 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	linux-kernel@...r.kernel.org,
	"Paul E. McKenney" <paulmck@...ibm.com>
Subject: Re: [PATCH 3/4] fib_trie: print statistics for multiple tables

On Tue, 12 Feb 2008 16:50:45 -0800 Stephen Hemminger <shemminger@...tta.com> wrote:

> +/**
> + * hlist_for_each_entry_continue_rcu - iterate over rcu hlist after current point
> + * @tpos:	the type * to use as a loop cursor.
> + * @pos:	the &struct hlist_node to use as a loop cursor.
> + * @member:	the name of the hlist_node within the struct.
> + */
> +#define hlist_for_each_entry_continue_rcu(tpos, pos, member)		\
> +	for (pos = (pos)->next;						\
> +	     rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) &&	\
> +		     ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
> +	     pos = pos->next)

Is the compiler allowed to look at a term such as

	({ prefetch(pos->next); 1;})

and, when it is used as a truth value, say "hey, that's always true" and
then elide the call to prefetch()?  We've no way of telling because this
remains gcc-specific territory, afaik.

(cc Paul for rcu stuff)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ