Received: by 10.223.176.46 with SMTP id f43csp670049wra; Thu, 18 Jan 2018 23:58:48 -0800 (PST) X-Google-Smtp-Source: ACJfBosKBZKFIltctwVD7h7meX+Pfi84sIaoZUC9610fXwcfAnqVKM3N0SAVryYmB0qeyw+gx2fc X-Received: by 10.98.215.30 with SMTP id b30mr25913916pfh.50.1516348728808; Thu, 18 Jan 2018 23:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516348728; cv=none; d=google.com; s=arc-20160816; b=rR4vi+eDwq1noqsHKqjscC4TsD4ZXrt4dDkE/zj3JdtLdzfALHFsJnU8NLhDQ6wgFu uJpsPQEqzgbLxggIdXhD9pEhzaiQ37M0nHsJ3i4iBHgtXEUOQIGW4Jp+Xmxps//mumUM Y3R9YbnJ8RrZltGDmqClMhWB0H9o4jbqjJhEfqp1j1yKLptZXN2Cw4oERQBbgUAYC8jh to+EJxBFs0T1xNQwDJiZ/Zk6GbAX4yNLtVzmD8+x+medsmJ3B3U2A7FkeQ691hDF37LP msf19l+aYPFIYcamQU7eJ7YkLcjVf7W+PLQdumYaPDNEuAR4ZWezBwyislLIOJ4uu++5 JcOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=rtPD8ASgVnBEDr3j45WK0Wtt7LDc8v/F8bGyqbqwsKA=; b=SA7+45z8hKj2iAHGpCo/Zl/86ZWtRdOJhGzOje6cOEOyMnDjT910C79U5vbvvwe0GB SyDFea8c+zfALoFN8kq2UBjpLwQPvV79yUDGeFU3E9sW0y/nhgmKtqtlA52AIgk6ZWtO Nm1hxB1fVJc/gXA3mFChjv8IIvfChBcTT5BABbFitXvfsLDylNJU8QL4EpxI3VOr0uIJ LiW56PZ/Vxc8Ko3r3fToEASBE8wqiiW/tais799Na0TEZckyYrbntcZp4KiQWIxeJeiU n9pc30rRU1aPCINQX3l0ebTovHcVD2HfCKvf9Y0Xl+GzuhdtgfriKFoLVI7Kc3tTew6O VG8A== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si7987990pgr.243.2018.01.18.23.58.35; Thu, 18 Jan 2018 23:58:48 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754542AbeASH6H (ORCPT + 99 others); Fri, 19 Jan 2018 02:58:07 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46250 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750948AbeASH57 (ORCPT ); Fri, 19 Jan 2018 02:57:59 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0J7sLQR045214 for ; Fri, 19 Jan 2018 02:57:59 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fkcfxgkjc-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 19 Jan 2018 02:57:58 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Jan 2018 07:57:57 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Jan 2018 07:57:54 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0J7vrh550397374; Fri, 19 Jan 2018 07:57:53 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8B3A11C04A; Fri, 19 Jan 2018 07:51:35 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 35B3611C04C; Fri, 19 Jan 2018 07:51:35 +0000 (GMT) Received: from oc7330422307.ibm.com (unknown [9.152.97.38]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 19 Jan 2018 07:51:35 +0000 (GMT) Subject: Re: [PATCH 6/6] s390: scrub registers on kernel entry and KVM exit To: QingFeng Hao , Martin Schwidefsky , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org Cc: Heiko Carstens , Paolo Bonzini , Cornelia Huck , Greg Kroah-Hartman , Jon Masters , Marcus Meissner , Jiri Kosina References: <1516182519-10623-1-git-send-email-schwidefsky@de.ibm.com> <1516182519-10623-7-git-send-email-schwidefsky@de.ibm.com> From: Christian Borntraeger Date: Fri, 19 Jan 2018 08:57:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18011907-0040-0000-0000-000004067E60 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011907-0041-0000-0000-00002609F5E0 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-19_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801190100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/19/2018 07:29 AM, QingFeng Hao wrote: > > > ?? 2018/1/17 17:48, Martin Schwidefsky ะด??: >> Clear all user space registers on entry to the kernel and all KVM guest >> registers on KVM guest exit if the register does not contain either a >> parameter or a result value. > I am not sure if I understand this but it will be safer? It ist similar to commit 0cb5b30698fd ("kvm: vmx: Scrub hardware GPRs at VM-exit"). The idea is to minimize potential payload channels. > And can we abstract the operations to be a macro like CLEAR_REG_7? No, please. xgr %r7,%r7 is absolutely clear what it does, a MACRO often is not.