Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3490139imu; Sun, 11 Nov 2018 16:16:31 -0800 (PST) X-Google-Smtp-Source: AJdET5dbN7KoqyJA0zh4+fsNWS62PPY+Md0kQbFXjG25yZUjS8jbcPqwaTflobKPjbHJ0QN5qby1 X-Received: by 2002:a62:de84:: with SMTP id h126-v6mr17871121pfg.129.1541981791759; Sun, 11 Nov 2018 16:16:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981791; cv=none; d=google.com; s=arc-20160816; b=BQCrJDoQbkjbo09BXZJJQGmP88FQnFaxMDgTyMJgGYsNHYKg1xFy5UxRNQLyPNDDNX i7wnHHZEWq5cf+MZlFB/IPKiNzIU7no7kgWmVw5tj1YAlqzMqOehWL3GAupfmAaIQCmB 1GHfwv8+bn5b0jLNEruH/P8klMd39BB7HRoZD5m8w0cd2CKbv6uHhi/MmyDDvQ0EH/t4 AJkAF8X8pSE9ZJ/UbM6RdBXlkeABILzzQrUZtY3fCXQ1QhTcEzdPHHa0+fadHCqhJRpJ kxDi4VtvetazMaZYNnJquzOKPI0HhYvMxpcqaefzP+CBD2zK1jm9qduof6FrNCDC77gp y6LA== 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=A8H3jrxHdMpye253fAyRy/ZBzUfdPdKdUwDrNTfvPoA=; b=z6vAGgKdUj95KonEDqpp1XvQVp7DpP7jl3J8z+voDzxEToUl7hO2sZ5ZN/XP2DOK4V r8FjTHwvKlycRiDxaMcTVNLB76RkwOoEFbdw8TQeDI3o0yd69PxffIrdiEjcMbazZ1mL z0oZTFg9m+nP8c9f4x/b4VtgVhKV0+qqpV8y0qrcKLv7SRgfUPMFEDm7/tnC0+LpwQyD dlzpDZTfTGatsTCDd/gB7luTIgC7tlua1qtlHdVK/ALx11pb0zdJjmosDqwDRVYmX8va OJeTkYVq7UzFWSsikLwfzhj/L/rLCBGoWmFAUSK3FG0zxjQUa223Dm5uVOSfTekfg9Ex 8dgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=St4UmANz; 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 p9si11999812pgc.448.2018.11.11.16.16.16; Sun, 11 Nov 2018 16:16:31 -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=St4UmANz; 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 S1730267AbeKLIRJ (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:59734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730201AbeKLIRH (ORCPT ); Mon, 12 Nov 2018 03:17:07 -0500 Received: from localhost (unknown [206.108.79.134]) (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 16D42223C8; Sun, 11 Nov 2018 22:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975232; bh=ysx8oaMaiUOyh3GfgdCNBS/mqA02WfF0PQiw1KQ+up4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=St4UmANzBX7d3539L8djS8CcT3H88ZUM4lyQHkiUnbpHEEV/lYSQPW71ZYhS7yHcY cUTBeTUddTTuyCZDb8mUtGep40ZC+ScIsN56OzZtHynZvYfe2C7NlMtFyxAQQgli58 Ly/CgSVai97j1NoGYpZ+VXyxoR3QLlTu9CPXPfEQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Janosch Frank , Martin Schwidefsky , Sasha Levin Subject: [PATCH 4.19 058/361] s390/sthyi: Fix machine name validity indication Date: Sun, 11 Nov 2018 14:16:45 -0800 Message-Id: <20181111221628.092862253@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Janosch Frank [ Upstream commit b5130dc2224d1881f24224c0590c6d97f2168d6a ] When running as a level 3 guest with no host provided sthyi support sclp_ocf_cpc_name_copy() will only return zeroes. Zeroes are not a valid group name, so let's not indicate that the group name field is valid. Also the group name is not dependent on stsi, let's not return based on stsi before setting it. Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation") Signed-off-by: Janosch Frank Signed-off-by: Martin Schwidefsky Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/sthyi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/arch/s390/kernel/sthyi.c +++ b/arch/s390/kernel/sthyi.c @@ -183,17 +183,19 @@ static void fill_hdr(struct sthyi_sctns static void fill_stsi_mac(struct sthyi_sctns *sctns, struct sysinfo_1_1_1 *sysinfo) { + sclp_ocf_cpc_name_copy(sctns->mac.infmname); + if (*(u64 *)sctns->mac.infmname != 0) + sctns->mac.infmval1 |= MAC_NAME_VLD; + if (stsi(sysinfo, 1, 1, 1)) return; - sclp_ocf_cpc_name_copy(sctns->mac.infmname); - memcpy(sctns->mac.infmtype, sysinfo->type, sizeof(sctns->mac.infmtype)); memcpy(sctns->mac.infmmanu, sysinfo->manufacturer, sizeof(sctns->mac.infmmanu)); memcpy(sctns->mac.infmpman, sysinfo->plant, sizeof(sctns->mac.infmpman)); memcpy(sctns->mac.infmseq, sysinfo->sequence, sizeof(sctns->mac.infmseq)); - sctns->mac.infmval1 |= MAC_ID_VLD | MAC_NAME_VLD; + sctns->mac.infmval1 |= MAC_ID_VLD; } static void fill_stsi_par(struct sthyi_sctns *sctns,