KVM: s390: vsie: fix < 8k check for the itdba
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Cornelia Huck
Quoted 14 lines · On Wed, 16 May 2018 10:04:45 +0200 Janosch Frank <[email protected]> wrote:
Quoted 12 lines · David Hildenbrand
By missing an "L", we might detect some addresses to be <8k, although they are not.
e.g. for itdba =
100001fff
!(gpa & ~0x1fffU) -> 1
!(gpa & ~0x1fffUL) -> 0So we would report a SIE validity intercept although everything is fine.
Reported-by Dan Carpenter <[email protected]>Reviewed-by Christian Borntraeger <[email protected]>Signed-off-by David Hildenbrand <[email protected]>
Quoted 8 lines
Quoted 5 lines
Reviewed-by Janosch Frank <[email protected]>I'd not necessarily sent it to stable, it's neither security related nor a bug that is likely to occur (IMHO) or should have dire consequences. But I leave that decision to Christian.
It probably does not hurt to include it in stable, but I don't think it's particularly important to do so, either. Anyway,
yes, lets cc stable.
Quoted 25 lines
Reviewed-by Cornelia Huck <[email protected]>Quoted 21 lines
Quoted 19 lines
--- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/s390/kvm/vsie.c +1
-1@@ -578,7 +578,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) gpa =READ_ONCE (scb_o->itdba) & ~0xffUL ;if (gpa && (scb_s->ecb &ECB_TE )) { -if (!(gpa & ~0x1fffU )) { +if (!(gpa & ~0x1fffUL )) { rc =set_validity_icpt (scb_s,0x0080U ); goto unpin; }