On Mon, 21 Aug 2017 14:27:45 +0200 Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote: > From: Heiko Carstens <heiko.carstens@xxxxxxxxxx> > > sthyi should only generate a specification exception if the function > code is zero and the response buffer is not on a 4k boundary. > > The current code would also test for unknown function codes if the > response buffer, that is currently only defined for function code 0, > is not on a 4k boundary and incorrectly inject a specification > exception instead of returning with condition code 3 and return code 4 > (unsupported function code). > > Fix this by moving the boundary check. > > Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") > Cc: <stable@xxxxxxxxxxxxxxx> # 4.8+ > 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 | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>