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:	Thu, 3 Dec 2009 11:49:06 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jan Beulich <JBeulich@...ell.com>
Cc:	tglx@...utronix.de, hpa@...or.com,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Nick Piggin <npiggin@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: slightly shorten __ticket_spin_trylock() (v2)


* Jan Beulich <JBeulich@...ell.com> wrote:

> Since the callers generally expect a boolean value, there's no need to
> zero-extend the outcome of the comparison. It just requires that all
> of x86' trylock implementations have their return type changed
> accordingly.
> 
> Don't use bool for the return type though - this is being frowned on
> and presently doesn't work with the pv-ops patching macros.
> 
> Signed-off-by: Jan Beulich <jbeulich@...ell.com>
> Cc: Nick Piggin <npiggin@...e.de>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> 
> ---
>  arch/x86/include/asm/paravirt.h       |    4 ++--
>  arch/x86/include/asm/paravirt_types.h |    2 +-
>  arch/x86/include/asm/spinlock.h       |   12 +++++-------
>  arch/x86/xen/spinlock.c               |    2 +-
>  4 files changed, 9 insertions(+), 11 deletions(-)

Looks much cleaner - and should give us pretty much the same savings as 
the previous patch, right? (if not, do you have a size comparison?)

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