Thread (48 messages) read the whole thread 48 messages, 5 authors, 2024-02-05

Re: [PATCH v2 06/25] KVM: arm64: nv: Add sanitising to VNCR-backed HCRX_EL2

From: Marc Zyngier <maz@kernel.org>
Date: 2024-02-02 20:15:48
Also in: kvmarm

On Fri, 02 Feb 2024 19:17:37 +0000,
Oliver Upton [off-list ref] wrote:
On Fri, Feb 02, 2024 at 05:15:51PM +0000, Oliver Upton wrote:
quoted
On Fri, Feb 02, 2024 at 02:56:50PM +0000, Marc Zyngier wrote:
quoted
No amount of warnings will do, because people don't give a damn.

I'm actually in favour of something far more radical: we snapshot the
raw value of all the used RES0/1, and put BUILD_BUG_ON()s that fire if
any value has changed. They will have to touch the KVM code to fix
that, and we catch them red-handed.
Oh I like that a lot more.
Unsure which registers you planned to give this treatment, but all of
the ID registers we know about should probably go in this bucket too.
Yup. My current plan is to simply extract all RES0/RES1 values from
arch/arm64/include/generated/asm/sysreg-defs.h (currently 232
definitions), and assert on that. We can relax it for registers that
don't have any RES0 or RES1 bits, but that's about it.

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help