Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2073735ybp; Thu, 10 Oct 2019 01:42:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUAFoz7HG30bph09h7XhQfOT5nNhKzOYwajsFGEWPtO2B5h5Wa5GXZHOl9IWQ6DgLjnsQN X-Received: by 2002:a17:906:d971:: with SMTP id rp17mr7122266ejb.42.1570696953535; Thu, 10 Oct 2019 01:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570696953; cv=none; d=google.com; s=arc-20160816; b=KbZutXS3QcqaJZ1d8j2e1jxPTMxxiQHdWnXI0NDRzwLoSPUi7IcZyqGu29XlRBz57o pRkK8YPbOKqkccb8cXcPDpY1gqf2wFFxWxu74kdGWpInGIm8CJ0kKz5t1CIJHcR8o2yf bT7DwFJgq2Cjtwn2VE8As50ZNwMHMvH8tGeg7dzfAHZ8t8dCUsQ3x0vYzj22OncNdAx8 PfKfHE5KmHoAf7PHExrSLfbvD6jvMuJFpqhhmw4MO+nQy66EAd0F8CWcflRTMi0XcGkF FuuWZTabnKvy6QpXnW19h+XfWGhOfHkgZ9m8m5Sebxz1CdnMmWS9RW1kgMcvNkdJFabW QjGw== 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=tr7YTFjPblJowUAXDwRlSks0z6JmRTslpExTiNug+LE=; b=F6b+J11eFU4nG6pN/eXXfQOh0NbS4QYTrfAMESfvfRXe+NnYqnjO1pbm0bARHWpe32 H2U+tc4wQvDscaH8VTDTkBjLHY9IdssKqEqMQ8t7Qr0I1j4TzgNZbHURouw7ZxTdnCEB 0oje2dgxYkK1qxk1xf5H2XVdb+rPnHQcabdJntSVad9I/DBW/sP43QnUxENgr0wwsdaD c0Ctw5amfXbcjqM+1vKkobNdeKGusZrc5AY5TwkjOW1l14QsUdIy47XMWqoA9zPII5cn Xx26IsMtDCkCTzudzOiRVIww7ACV2UU8dMLiOvrBmpu3kSFY4ZjYaMtN4nbOzUtC5Zan TJUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AFUsE56+; 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 f17si3975064edf.328.2019.10.10.01.42.10; Thu, 10 Oct 2019 01:42:33 -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=AFUsE56+; 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 S2387787AbfJJIjI (ORCPT + 99 others); Thu, 10 Oct 2019 04:39:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:42324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387767AbfJJIjG (ORCPT ); Thu, 10 Oct 2019 04:39:06 -0400 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 4D48D20B7C; Thu, 10 Oct 2019 08:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696745; bh=zCNBAvfBC2GkCrSrnVZbh81b4yRACjXiRWvWQuy7CBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AFUsE56+kKc201824jywSAyew612qaWxLHW7dn9+TsQZTQJkD4Z8cpNxy/ftVjXn9 CK2tVtkjtFRYuoDHBPTPzBLWVJan8EGgN09oWLlNie5gKseul3Ig67hU3jRSsuI8uv FSfNys7j6eO9fCFDifQp41t1rBJG+Twi/eVXWJvk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Borntraeger , Heiko Carstens , Vasily Gorbik Subject: [PATCH 5.3 009/148] KVM: s390: fix __insn32_query() inline assembly Date: Thu, 10 Oct 2019 10:34:30 +0200 Message-Id: <20191010083611.628970243@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@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: Heiko Carstens commit b1c41ac3ce569b04644bb1e3fd28926604637da3 upstream. The inline assembly constraints of __insn32_query() tell the compiler that only the first byte of "query" is being written to. Intended was probably that 32 bytes are written to. Fix and simplify the code and just use a "memory" clobber. Fixes: d668139718a9 ("KVM: s390: provide query function for instructions returning 32 byte") Cc: stable@vger.kernel.org # v5.2+ Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/kvm-s390.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -332,7 +332,7 @@ static inline int plo_test_bit(unsigned return cc == 0; } -static inline void __insn32_query(unsigned int opcode, u8 query[32]) +static inline void __insn32_query(unsigned int opcode, u8 *query) { register unsigned long r0 asm("0") = 0; /* query function */ register unsigned long r1 asm("1") = (unsigned long) query; @@ -340,9 +340,9 @@ static inline void __insn32_query(unsign asm volatile( /* Parameter regs are ignored */ " .insn rrf,%[opc] << 16,2,4,6,0\n" - : "=m" (*query) + : : "d" (r0), "a" (r1), [opc] "i" (opcode) - : "cc"); + : "cc", "memory"); } #define INSN_SORTL 0xb938