Re: [PATCH v2] arm64: KVM: define ESR_ELx_EC_* constants as UL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Sep 2024 09:50:16 +0100,
Anastasia Belova <abelova@xxxxxxxxxxxxx> wrote:
> 
> Add explicit casting to prevent expantion of 32th bit of
> u32 into highest half of u64 in several places.
> 
> For example, in inject_abt64:
> ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT = 0x24 << 26.
> This operation's result is int with 1 in 32th bit.
> While casting this value into u64 (esr is u64) 1
> fills 32 highest bits.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: aa8eff9bfbd5 ("arm64: KVM: fault injection into a guest")
> Signed-off-by: Anastasia Belova <abelova@xxxxxxxxxxxxx>

nit: the subject line is misleading, as this doesn't only affect KVM,
but the whole of the arm64 port (the exception classes form a generic
architectural construct).

This also probably deserve a Cc stable.

Will, Catalin: I'm happy to queue this in the KVM tree, but if you are
taking it directly:

Acked-by: Marc Zyngier <maz@xxxxxxxxxx>

Thanks,

	M.

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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux