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: <ZjpALOdSgu-qhshR@finisterre.sirena.org.uk>
Date: Tue, 7 May 2024 23:52:28 +0900
From: Mark Brown <broonie@...nel.org>
To: "Liao, Chang" <liaochang1@...wei.com>
Cc: Mark Rutland <mark.rutland@....com>, catalin.marinas@....com,
	will@...nel.org, maz@...nel.org, oliver.upton@...ux.dev,
	james.morse@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
	tglx@...utronix.de, ardb@...nel.org, anshuman.khandual@....com,
	miguel.luis@...cle.com, joey.gouly@....com, ryan.roberts@....com,
	jeremy.linton@....com, ericchancf@...gle.com,
	kristina.martsenko@....com, robh@...nel.org,
	scott@...amperecomputing.com, songshuaishuai@...ylab.org,
	shijie@...amperecomputing.com, akpm@...ux-foundation.org,
	bhe@...hat.com, horms@...nel.org, mhiramat@...nel.org,
	rmk+kernel@...linux.org.uk, shahuang@...hat.com,
	takakura@...inux.co.jp, dianders@...omium.org, swboyd@...omium.org,
	sumit.garg@...aro.org, frederic@...nel.org, reijiw@...gle.com,
	akihiko.odaki@...nix.com, ruanjinjie@...wei.com,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	kvmarm@...ts.linux.dev
Subject: Re: [PATCH v3 1/8] arm64/sysreg: Add definitions for immediate
 versions of MSR ALLINT

On Tue, May 07, 2024 at 03:41:08PM +0800, Liao, Chang wrote:
> 在 2024/5/6 23:15, Mark Brown 写道:
> > On Fri, May 03, 2024 at 05:00:49PM +0100, Mark Rutland wrote:

> >> +#define set_pstate_allint(x)           asm volatile(SET_PSTATE_ALLINT(x))

> > Hrm, those helpers are not ideally discoverable, partly due to the
> > system register description for ALLINT not providing any references to
> > this being a general scheme (which is fixable there) and partly due to

> Based on the Arm ISA reference manual, the instruction accessing the ALLINT
> field of PSTATE uses the following encoding:

I'm not saying the suggestion is wrong, I'm saying that between the ARM
and the way the code is written the helpers aren't as discoverable as
they should be, like I say from a code point of view that's mainly
because...

>                     op0  op1   CRn    CRm    op2
> MSR ALLINT, #<imm>  0b00 0b001 0b0100 0b000x 0b000

...we only have the encoding for the MSR and don't mention the letters
'msr' anywhere.  We should improve that to say what we're encoding in
the code (in general I'd say that's true for any __emit_inst(), not just
these ones).

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ