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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121003121132.GG2628@tassilo.jf.intel.com>
Date:	Wed, 3 Oct 2012 05:11:32 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	Avi Kivity <avi@...hat.com>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	acme@...hat.com, x86@...r.kernel.org, eranian@...gle.com,
	jolsa@...hat.com, a.p.zijlstra@...llo.nl
Subject: Re: [PATCH 06/31] perf, kvm: Support the intx/intx_cp modifiers in
 KVM arch perfmon emulation

> > -			eventsel & ARCH_PERFMON_EVENTSEL_INT);
> > +			eventsel & ARCH_PERFMON_EVENTSEL_INT,
> > +			!!(eventsel & HSW_INTX),
> > +			!!(eventsel & HSW_INTX_CHECKPOINTED));
> >  }
> >  
> 
> Those !! are !necessary, since the formal argument is a bool.

bool is 1 or 0, x & y with y > 1 is not 1 or 0.
iirc assigning > 1 to bool is undefined

So I think they are necessary.

Or did I misundersand you?

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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