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: <20250715094451.GDaHYjE68KhYiz_r20@fat_crate.local>
Date: Tue, 15 Jul 2025 11:44:51 +0200
From: Borislav Petkov <bp@...en8.de>
To: Nikunj A Dadhania <nikunj@....com>
Cc: Sean Christopherson <seanjc@...gle.com>,
	Tom Lendacky <thomas.lendacky@....com>,
	linux-kernel@...r.kernel.org, x86@...nel.org, tglx@...utronix.de,
	mingo@...hat.com, dave.hansen@...ux.intel.com,
	santosh.shukla@....com
Subject: Re: [PATCH] x86/sev: Improve handling of writes to intercepted
 GUEST_TSC_FREQ

On Tue, Jul 15, 2025 at 09:13:10AM +0000, Nikunj A Dadhania wrote:
> That will panic the SNP guest instead of #GP:
> 
> root@...ntu:~# wrmsr 0xc0010134 0
> [   20.804335] ------------[ cut here ]------------
> [   20.804336] WARNING: arch/x86/coco/sev/vc-handle.c:383 at vc_handle_exitcode.part.0+0xc1b/0x1090, CPU#0: wrmsr/607
> ...
> [   20.804507] SEV: Unsupported exception in #VC instruction emulation - can't continue
> [   20.804508] ------------[ cut here ]------------
> [   20.804508] kernel BUG at arch/x86/coco/sev/vc-handle.c:123!
> [   20.804514] Oops: invalid opcode: 0000 [#1] SMP NOPTI

You need to make trapnr become X86_TRAP_GP in vc_forward_exception() so that
the GP handler is called.

Or wait for Tom to wake up to double-check his suggestion... :-)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ