Re: [PATCH 10/11] KVM: s390: sthyi: remove invalid guest write access

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

 



On Mon, 28 Aug 2017 10:07:30 +0200
Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:

> From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
> 
> handle_sthyi() always writes to guest memory if the sthyi function
> code is zero in order to fault in the page that later is written to.
> 
> However a function code of zero does not necessarily mean that a write
> to guest memory happens: if the KVM host is running as a second level
> guest under z/VM 6.2 the sthyi instruction is indicated to be
> available to the KVM host, however if the instruction is executed it
> will always return with a return code that indicates "unsupported
> function code".
> 
> In such a case handle_sthyi() must not write to guest memory. This
> means that the prior write access to fault in the guest page may
> result in invalid guest exceptions, and/or invalid data modification.
> 
> In order to be architecture compliant simply remove the write_guest()
> call.
> 
> Given that the guest assumed a write access anyway, this fix does not
> qualify for -stable. This just makes sure the sthyi handler is
> architecture compliant.
> 
> Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation")
> Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> ---
>  arch/s390/kvm/sthyi.c | 8 --------
>  1 file changed, 8 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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