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]
Message-ID: <20160314073803.22c90d69@arm.com>
Date:	Mon, 14 Mar 2016 07:38:03 +0000
From:	Marc Zyngier <marc.zyngier@....com>
To:	Pratyush Anand <panand@...hat.com>
Cc:	David Long <dave.long@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Sandeepa Prabhu <sandeepa.s.prabhu@...il.com>,
	William Cohen <wcohen@...hat.com>,
	"Steve Capper" <steve.capper@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>,
	Dave P Martin <Dave.Martin@....com>,
	"Mark Rutland" <mark.rutland@....com>,
	Robin Murphy <Robin.Murphy@....com>,
	"Ard Biesheuvel" <ard.biesheuvel@...aro.org>,
	Jens Wiklander <jens.wiklander@...aro.org>,
	Christoffer Dall <christoffer.dall@...aro.org>,
	Alex Bennée 
	<alex.bennee@...aro.org>, Yang Shi <yang.shi@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	"Suzuki K. Poulose" <suzuki.poulose@....com>,
	Kees Cook <keescook@...omium.org>,
	Zi Shen Lim <zlim.lnx@...il.com>,
	John Blackwood <john.blackwood@...r.com>,
	Feng Kan <fkan@....com>,
	Balamurugan Shanmugam <bshanmugam@....com>,
	James Morse <james.morse@....com>,
	Vladimir Murzin <Vladimir.Murzin@....com>,
	"Mark Salyzyn" <salyzyn@...roid.com>,
	Petr Mladek <pmladek@...e.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v11 4/9] arm64: add conditional instruction simulation
 support

On Mon, 14 Mar 2016 09:34:55 +0530
Pratyush Anand <panand@...hat.com> wrote:

Hi Pratyush,

> On 13/03/2016:12:09:03 PM, Marc Zyngier wrote:
> > On Wed,  9 Mar 2016 00:32:18 -0500
> > David Long <dave.long@...aro.org> wrote:
> > 
> > > +pstate_check_t * const opcode_condition_checks[16] = {
> > > +	__check_eq, __check_ne, __check_cs, __check_cc,
> > > +	__check_mi, __check_pl, __check_vs, __check_vc,
> > > +	__check_hi, __check_ls, __check_ge, __check_lt,
> > > +	__check_gt, __check_le, __check_al, __check_al
> > 
> > The very last entry seems wrong, or is at least the opposite of what
> > the current code has. It should be something called __check_nv(), and
> > always return false (condition code NEVER).
> 
> May be __check_nv() name is more appropriate as per definition, but shouldn't it
> still return true, because TRM says:
> "The condition code NV exists only to provide a valid disassembly of the 0b1111
> encoding, otherwise its behavior is identical to AL"

Indeed, I missed that. But this interpretation is for the A64
instruction set, and this array is also used by the new
arm32_check_condition. The condition code table for A32 seems to
completely ignore the 0b1111 code (there is simply no entry for it), and
it is only in the ConditionHolds pseudocode that you can see how this
is actually special-cased.

So I'm fine leaving the code as it is, but a comment and a pointer to
the ARMv8 ARM wouldn't go amiss.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ