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: <aElTaqOqzAi17H2b@J2N7QTR9R3>
Date: Wed, 11 Jun 2025 10:59:06 +0100
From: Mark Rutland <mark.rutland@....com>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: Marc Zyngier <maz@...nel.org>, linux-arm-kernel@...ts.infradead.org,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>,
	Ada Couprie Diaz <ada.coupriediaz@....com>,
	linux-kernel@...r.kernel.org, Oliver Upton <oliver.upton@...ux.dev>,
	Joey Gouly <joey.gouly@....com>, kvm@...r.kernel.org,
	kvmarm@...ts.linux.dev, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH V3 2/2] KVM: selftests: Change MDSCR_EL1 register holding
 variables as uint64_t

On Wed, Jun 11, 2025 at 09:15:10AM +0530, Anshuman Khandual wrote:
> 
> 
> On 10/06/25 10:31 PM, Marc Zyngier wrote:
> > On Tue, 10 Jun 2025 06:31:28 +0100,
> > Anshuman Khandual <anshuman.khandual@....com> wrote:
> >>
> >> Change MDSCR_EL1 register holding local variables as uint64_t that reflects
> >> its true register width as well.
> >>
> >> Cc: Marc Zyngier <maz@...nel.org>
> >> Cc: Oliver Upton <oliver.upton@...ux.dev>
> >> Cc: Joey Gouly <joey.gouly@....com>
> >> Cc: kvm@...r.kernel.org
> >> Cc: kvmarm@...ts.linux.dev
> >> Cc: linux-kernel@...r.kernel.org
> >> Cc: linux-kselftest@...r.kernel.org
> >> Cc: linux-arm-kernel@...ts.infradead.org
> >> Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@....com>
> >> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> >> ---
> >>  tools/testing/selftests/kvm/arm64/debug-exceptions.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/tools/testing/selftests/kvm/arm64/debug-exceptions.c b/tools/testing/selftests/kvm/arm64/debug-exceptions.c
> >> index c7fb55c9135b..e34963956fbc 100644
> >> --- a/tools/testing/selftests/kvm/arm64/debug-exceptions.c
> >> +++ b/tools/testing/selftests/kvm/arm64/debug-exceptions.c
> >> @@ -140,7 +140,7 @@ static void enable_os_lock(void)
> >>  
> >>  static void enable_monitor_debug_exceptions(void)
> >>  {
> >> -	uint32_t mdscr;
> >> +	uint64_t mdscr;
> >>  
> >>  	asm volatile("msr daifclr, #8");
> >>  
> >> @@ -223,7 +223,7 @@ void install_hw_bp_ctx(uint8_t addr_bp, uint8_t ctx_bp, uint64_t addr,
> >>  
> >>  static void install_ss(void)
> >>  {
> >> -	uint32_t mdscr;
> >> +	uint64_t mdscr;
> >>  
> >>  	asm volatile("msr daifclr, #8");
> >>  
> > 
> > Why change this in the place that matters *the least*?
> > 
> > arch/arm64/kernel/debug-monitors.c is full of 32bit manipulation of
> > this register, and that's only one example of it. So if you are going
> > to change this, please do it fully, not as a random change in a random
> > file.
> 
> The first patch in this series changes mdscr system register to 64 bit
> in the mentioned file (i.e arch/arm64/kernel/debug-monitors.c). 

You did not Cc Marc on oatch 1 or the cover letter. KVM folk are only
Cc'd on patch 2.

Marc, for context the series is:

  https://lore.kernel.org/linux-arm-kernel/20250610053128.4118784-1-anshuman.khandual@arm.com/

... and I've asked Anshuman to better describe the rationale.

Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ