Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6208574ybv; Tue, 18 Feb 2020 12:03:53 -0800 (PST) X-Google-Smtp-Source: APXvYqw6zsNal7RoIN/V6xQSYkSNuzD8+U/I4M7SiM5PoifZpe5BcBNtdwMq5jvUKLUvEHhaVTRP X-Received: by 2002:a9d:760d:: with SMTP id k13mr16342904otl.42.1582056232501; Tue, 18 Feb 2020 12:03:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582056232; cv=none; d=google.com; s=arc-20160816; b=rFBiFRXUVLnQRi9CsbCesNl7w1DjX2g//tWipD0UhQJxCCYPJehN4J3Ov/tYIs7aoW TnUPIWJgz+/drxrjqZ0c2/Dj1fUrp2251QzxARWI880YflVLSppuqLBenmUAcd6r6Ubb 9WTc4cC257pF4c85wTwWyOh+eKYlGeSbZtdkPHHWGOXsTPfe5Bte9p6mT0GyKsLek8QA 6q4xD+3LO+F/SgNK3k0L7CTE9qFrNZfKLFkjXOh1943d7WVGZoVTMySC3g2KUmt/zVKq vWlzY8cMw71L5LCSpYbrSQsLg2yxqZ82aR4pn7TWjX12VH4o9dz74t6VjUHYUNGOmxvN 8PtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=owAY+lYAFoQ/Vd63Yi4OaVRi/wu4rp6LtLbzkcvFbcs=; b=POqqoLQFAlkmOsfdMT0Jxf99HnytNPuQb5eqgmudSLy7oovC4kcbjoHzkzatHjYKbG 8uNeUKYQReTOyd4VZi68V45XnZHQwtDBYlpgVnbpCdEDswti6imkeI5XIW0yZ0hb3KVI s0dmqXbH5+9dmdUnQp1V+LZ8LeFPMivw0TYv5yR4//1BusDr4I5ItqS88+k1eFsIMgN8 /mBx0QI5Vvj+1FJp1fPJKTtbnqs/UuARrKW+TlYOZqgjtsSXKfeWpkBrMhVSf4b/wQrR yAaLMvAY50e75xAyCyMihUJUwbzd4sRukgCWiOqBumktEFbRdMgIKSPtC53CtLNbzZyp cZdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="XsdVCE/j"; 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 k125si7640223oib.212.2020.02.18.12.03.39; Tue, 18 Feb 2020 12:03:52 -0800 (PST) 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="XsdVCE/j"; 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 S1729114AbgBRUDf (ORCPT + 99 others); Tue, 18 Feb 2020 15:03:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:44730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728964AbgBRUD2 (ORCPT ); Tue, 18 Feb 2020 15:03:28 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 62D5221D56; Tue, 18 Feb 2020 20:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582056207; bh=VlYFbi8R93NZ9MLjbFG8aNwqFw6eH/NfQOSq89lK47Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XsdVCE/jVm1qgN+yVQPEcV6BXIQUcy5Lcmr2gZNTSSv1+zQKQl9SoKnhRn8V4fCs1 q2ahlSvfaqvLzDFkuSiz9BNd2MQ+2S3fFk32RQdv6hFgr3fJh5LkH53+RcBF3fkekg IyKwwC8HU3wh00Ut4hCL1wsiiGKETnXzrlWMq/Bg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cornelia Huck , Christian Borntraeger , Vasily Gorbik Subject: [PATCH 5.5 39/80] s390/uv: Fix handling of length extensions Date: Tue, 18 Feb 2020 20:55:00 +0100 Message-Id: <20200218190436.134907146@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200218190432.043414522@linuxfoundation.org> References: <20200218190432.043414522@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Borntraeger commit 27dc0700c3be7c681cea03c5230b93d02f623492 upstream. The query parameter block might contain additional information and can be extended in the future. If the size of the block does not suffice we get an error code of rc=0x100. The buffer will contain all information up to the specified size and the hypervisor/guest simply do not need the additional information as they do not know about the new data. That means that we can (and must) accept rc=0x100 as success. Cc: stable@vger.kernel.org Reviewed-by: Cornelia Huck Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code") Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik Signed-off-by: Greg Kroah-Hartman --- arch/s390/boot/uv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/s390/boot/uv.c +++ b/arch/s390/boot/uv.c @@ -15,7 +15,8 @@ void uv_query_info(void) if (!test_facility(158)) return; - if (uv_call(0, (uint64_t)&uvcb)) + /* rc==0x100 means that there is additional data we do not process */ + if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100) return; if (test_bit_inv(BIT_UVC_CMD_SET_SHARED_ACCESS, (unsigned long *)uvcb.inst_calls_list) &&