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-next>] [day] [month] [year] [list]
Message-Id: <20091102170815.86e2daf7.sfr@canb.auug.org.au>
Date:	Mon, 2 Nov 2009 17:08:15 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Hollis Blanchard <hollisb@...ibm.com>
Cc:	Avi Kivity <avi@...hat.com>, linux-next@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: KVM: powerpc: Fix BUILD_BUG_ON condition

Hi Hollis, Avi,

This commit was added to the kvm tree recently:

> Author: Hollis Blanchard <hollisb@...ibm.com>
> Date:   Fri Oct 23 00:35:30 2009 +0000
> 
>     KVM: powerpc: Fix BUILD_BUG_ON condition
>     
>     The old BUILD_BUG_ON implementation didn't work with __builtin_constant_p().
>     Fixing that revealed this test had been inverted for a long time without
>     anybody noticing...
>     
>     Signed-off-by: Hollis Blanchard <hollisb@...ibm.com>
>     Signed-off-by: Avi Kivity <avi@...hat.com>
> 
> diff --git a/arch/powerpc/kvm/timing.h b/arch/powerpc/kvm/timing.h
> index bb13b1f..a550f0f 100644
> --- a/arch/powerpc/kvm/timing.h
> +++ b/arch/powerpc/kvm/timing.h
> @@ -48,7 +48,7 @@ static inline void kvmppc_set_exit_type(struct kvm_vcpu *vcpu, int type) {}
>  static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type)
>  {
>  	/* type has to be known at build time for optimization */
> -	BUILD_BUG_ON(__builtin_constant_p(type));
> +	BUILD_BUG_ON(!__builtin_constant_p(type));
>  	switch (type) {
>  	case EXT_INTR_EXITS:
>  		vcpu->stat.ext_intr_exits++;

It is OK as far as it goes.  It still does not build, though, due to the
new BUILD_BUG_ON macro.  So I have still commented out the BUILD_BUG_ON
in linux-next.

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ