Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2365602imm; Mon, 28 May 2018 06:49:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZps46UAPCJfcr6WsYIIOmCVPBSSUYfNowYXWk759UkU3XrekrqKdPZkdhKa3WsFfWQ//jue X-Received: by 2002:a63:5f0b:: with SMTP id t11-v6mr10554282pgb.79.1527515348165; Mon, 28 May 2018 06:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527515348; cv=none; d=google.com; s=arc-20160816; b=hRHUWT2WUI5Hm+uUvyTlYXrJZ7kaQsvI58dPPdGnyoGMcBv6/SViMHLPSJhpIjgY8C G8lQ0aIl5DN1XzG+6fdwAmYF3sN24Jo5YhXMDhe9wkTd1CSrOJjN45XvFZ5vXmVL7rRB yBIUWsVncDKOPArju0f2HyzyQnVJbY1k4/bkblSu3slM77EF9TIbgt6vAHXBn+m0lFVN CSwayYVMGT7GMAKtjc0G6uu2sbpcW3eeVoMC4Wf0X14ehC7GvzITSoIec3W0OyfsCmAQ v7qPkWaULlMbntz4xOLXEwFg6OqBMmZqUEEvH9jIlUABtMQVFMZ5NlsEb6q8wt9b0gPp UTNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VgvYoyEJf4JK/cUgwRTk0VPyTCtWdB6LquWZiWrNytc=; b=jUTQnruVNoxEMaz0chCbB/yzWvegI0fYETp8P2BXBVO7XRgvq7iNG6NQgkqkWm+4Cp 6pG7i0L3tjA1JaqO3u8WQZBB3AqCgfZjI2SwdSkUvWcZckZA6ceObzI5o4dBnFH/1FTS f1a52wZdUES2dWp6e2PJVK9BxDySh46nMBccDwJxVJMoAFSnWinQXmLRIsXAZscdS5rm BBfbPgH2C37Zr4on6T5zOipdqjz+B5oFXb5BnicrbwJPdOhU5cI/A86b5ednAhoHkqGF pun9qXGpZqVKXEWWyrweWafxf0puUOYsdD34IwP2Nl5MV6zYGJdMNx0yv93k1HpVpnc3 gzvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HCGrwits; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24-v6si30799188pfj.6.2018.05.28.06.48.53; Mon, 28 May 2018 06:49:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HCGrwits; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939246AbeE1NsL (ORCPT + 99 others); Mon, 28 May 2018 09:48:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:33792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937482AbeE1Km3 (ORCPT ); Mon, 28 May 2018 06:42:29 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 262B82086D; Mon, 28 May 2018 10:42:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504148; bh=HusmszraU1iKlj2LBCDG3IWciXXiVMqJqtXf7Msw2ms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HCGrwitsWYCUG/VRS4Pl0AQcpyBEOIxDoW/DzMSLFaORov6LS2fUNFP840VLuI+bH H7CiODRsA4Lt8rFJsu9Fzxvc6mF3YnJcP9AQIN9QiYG9LHKl8IuTpnaFfSB1QKrXfB zlGQLZK9cviDMzhXHlBLPQxSLUISEEEkdMBnZUZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Christian Borntraeger , Janosch Frank , Cornelia Huck , David Hildenbrand Subject: [PATCH 4.14 030/496] KVM: s390: vsie: fix < 8k check for the itdba Date: Mon, 28 May 2018 11:56:55 +0200 Message-Id: <20180528100320.855375849@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Hildenbrand commit f4a551b72358facbbe5714248dff78404272feee upstream. 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) -> 0 So we would report a SIE validity intercept although everything is fine. Fixes: 166ecb3 ("KVM: s390: vsie: support transactional execution") Reported-by: Dan Carpenter Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand Signed-off-by: Janosch Frank Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Christian Borntraeger Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -590,7 +590,7 @@ static int pin_blocks(struct kvm_vcpu *v 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; }