Re: [PATCH v2 1/5] KVM: s390: vsie: Fix region 1 ASCE sanity shadow address checks

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

 




> Am 03.04.2020 um 19:56 schrieb Christian Borntraeger <borntraeger@xxxxxxxxxx>:
> 
> 
> 
>> On 03.04.20 17:30, David Hildenbrand wrote:
>> In case we have a region 1 ASCE, our shadow/g3 address can have any value.
>> Unfortunately, (-1UL << 64) is undefined and triggers sometimes,
>> rejecting valid shadow addresses when trying to walk our shadow table
>> hierarchy.
> 
> I thin the range of the addresses do not matter.
> Took me a while to understand maybe rephrase that:
> 
> In case we have a region 1 the following calculation 
> (31 + ((gmap->asce & _ASCE_TYPE_MASK) >> 2)*11)
> results in 64. As shifts beyond the size are undefined the compiler is free to use
> instructions like sllg. sllg will only use 6 bits of the shift value (here 64)
> resulting in no shift at all. That means that ALL addresses will be rejected.

Interestingly, it would not fail when shadowing the r2t, but only when trying to shadow the r3t.

> 
> With that this makes sense. 
> 
> Reviewed-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> 

In case there are no other comments, can you fixup when applying, or do you want me to resend?

Cheers




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux