Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp381254ybe; Wed, 4 Sep 2019 00:56:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5VLOe6vu7jqzstSYG6EJL8uKeJyZXipSlpwQ5N2eZUw9pYKnBWQGLeFKZtTMIjLxJUuHb X-Received: by 2002:a17:90a:ac14:: with SMTP id o20mr3629568pjq.143.1567583763161; Wed, 04 Sep 2019 00:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567583763; cv=none; d=google.com; s=arc-20160816; b=Stos/lmZaKrRx7EpQxTtUxn9G5h+K03HMM53jCYhl23QQr5fOd7FcvIeajL4eYnKjW hokdFz3JsqXcqXnlKxepXGHBw9wJZQnK2g1YuyM5dJ0ad/X6T17cvsIn3XwGo535tqWu pkuFAtUFd+S4oaabW1qS0fzmq6HqTPSZ+mELRk+UV3Nsw0Y0hxVZ36a4HpynJ+0V3TnP w7xxQMqrv5QqD0RPnjAfGmGihJYKQaew4RyggpCRjmYbJIVHgzBUyjc5mRj7c5EH9gIK RppkN4wXOz14fkISsdBFeo7D1hENvKtaCoPNwW6mKsSWF/xwIt4yovoJfQE2EXeUK/if JpRA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=LOGcLfteciq+7qfLR9VQNXfOMSW2f4SId9m+4zCbc1Q=; b=RwYT9ITz5ZhPwgfSYLdzOoZy8PckcmySBK6DgtUeIVz6yWN6jyxZHe8KeXb53anKoZ Bo7aF11ULmJ+YvlFzOatn0WanVSuMQIzXrd64iEiOMXpN6yQLx2B6hxosx53RqaSx26n VvcdeHXd9wcETvdD9mhDUQtoi0VFYcwMLbrIyUAkp0rYm6NuAMTIHtTuOWlszsWYNKbm tI3mzJysptgSSjRb+i/wavqxPO1sjAW0JLdWL0xn3EPWpZPBWRX85kmo6poBefvjSRAH Ol+xHg8j0NqPIB5R60DvPwz/6h27ipp/pRWjD0vbperzsGIaUsSq1atMoFiOApWc0yy5 yyqQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186si16691978pgc.248.2019.09.04.00.55.47; Wed, 04 Sep 2019 00:56:03 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729272AbfIDHyz (ORCPT + 99 others); Wed, 4 Sep 2019 03:54:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729112AbfIDHyz (ORCPT ); Wed, 4 Sep 2019 03:54:55 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3288C300C72A; Wed, 4 Sep 2019 07:54:55 +0000 (UTC) Received: from gondolin (ovpn-117-161.ams2.redhat.com [10.36.117.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id F19F06092D; Wed, 4 Sep 2019 07:54:50 +0000 (UTC) Date: Wed, 4 Sep 2019 09:54:47 +0200 From: Cornelia Huck To: Thomas Huth Cc: kvm@vger.kernel.org, Christian Borntraeger , Janosch Frank , David Hildenbrand , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: s390: Disallow invalid bits in kvm_valid_regs and kvm_dirty_regs Message-ID: <20190904095447.05b3b845.cohuck@redhat.com> In-Reply-To: <20190904071308.25683-1-thuth@redhat.com> References: <20190904071308.25683-1-thuth@redhat.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 04 Sep 2019 07:54:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Sep 2019 09:13:08 +0200 Thomas Huth wrote: > If unknown bits are set in kvm_valid_regs or kvm_dirty_regs, this > clearly indicates that something went wrong in the KVM userspace > application. The x86 variant of KVM already contains a check for > bad bits (and the corresponding kselftest checks this), so let's > do the same on s390x now, too. > > Signed-off-by: Thomas Huth > --- > arch/s390/include/uapi/asm/kvm.h | 6 ++++ > arch/s390/kvm/kvm-s390.c | 4 +++ > .../selftests/kvm/s390x/sync_regs_test.c | 30 +++++++++++++++++++ > 3 files changed, 40 insertions(+) With splitting out the selftest, Reviewed-by: Cornelia Huck