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] [day] [month] [year] [list]
Date:	Fri, 28 Mar 2008 16:09:32 +1100
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Roel Kluin <12o3l@...cali.nl>
Cc:	Daniel Walker <dwalker@...sta.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 -mm] likeliness accounting change and cleanup

On Friday 28 March 2008 07:25, Roel Kluin wrote:
> Daniel Walker wrote:
> > It's looks good to me .. You'll have to send it to Andrew to get it
> > included tho ..
> >
> > Daniel
>
> Store __builtin_return_address (caller) rather than __func__ in likeliness
> struct. 'line' and 'type' are combined in 'label'
>
> +/- now denotes whether expectation fails in less than 5% of the tests -
> rather than whether more unexpected than expected were encountered. The
> function at the displayed filename & line and the caller are not
> necessarily the same. A few more Likely Profiling Results changes were
> made.
>
> struct seq_operations becomes static, unsigned ints true and false
> (shadowed) are replaced by pos and neg.
>
> Signed-off-by: Roel Kluin <12o3l@...cali.nl>

Patch looks fine to me.

Acked-by: Nick Piggin <npiggin@...e.de>

>  		if (!test_and_set_bit(0, &likely_lock)) {
> -			if (likeliness->type & LP_UNSEEN) {
> -				likeliness->type &= (~LP_UNSEEN);
> +			if (likeliness->label & LP_UNSEEN) {
> +				likeliness->label &= (~LP_UNSEEN);
>  				likeliness->next = likeliness_head;
>  				likeliness_head = likeliness;
> +				likeliness->caller = (unsigned long)
> +						__builtin_return_address(0);
>  			}
>  			smp_mb__before_clear_bit();
>  			clear_bit(0, &likely_lock);

While you're cleaning up this code, any chance you'd like to
change this to test_and_set_bit_lock() / clear_bit_unlock() ?
(in a 2nd patch).

The current usage is not wrong as such, but the _lock routines are
faster and provide a better example to follow...

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