Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3408475pxu; Sun, 20 Dec 2020 01:47:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCIVCvRe13ceNfNhA18xUIo1PGDGrJLOTyXpOL/ib7vJH0JU1XYFyJuwHaVUGAe6AaivIU X-Received: by 2002:a50:e80c:: with SMTP id e12mr11475195edn.288.1608457649380; Sun, 20 Dec 2020 01:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608457649; cv=none; d=google.com; s=arc-20160816; b=rmM5sNRIj2m5JtmDpnsbsQ/PZHgVV7lPoqas35mXCN/Rt0hCCdB2dNgqUiVjlmwpa4 iCHjE81vne+ytBX6jRsoMbB3jryNhJSLcop/NTHiWRtez/Jq1gRADZQmn2KOZapMmjMR CHthgTRQjmcOPcv1ccdHI93OzfdQ000+ky1c75cNw+gji7ZSPk8oiffFhxdD4Wa6pa5/ KGpeJIKcpSagMwvqMiehdHGTm25xYJPEy85WggANXtA2+wXWVmKTRhHihFDsGh4qdEu1 TrvGa88H1mJtvbXDyFr5dVwE4r3XO4JDhgbtqGKNvpaQYj/VpjjFeIUul2XFL7Bb3yYT vMJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=hZuuWYgsYqtOq9pElDc1NbTuuW8utHaswvEIseLkrwU=; b=YesdE6/VAsIylRpjs8Y0cZRBHw00V3o8PNGzO1wZKld7vroGUOYQWf5eAILmyDVbzl 7c4qvIXWk5ERH9rr8IFk9l6Ina+GbwevsFc0x741QyTVi3YDY7Z5gBOykl407M8xxIwr 54fmXbJpq+L98lZ4eVvL2UwmMd9erKzus+5a0zCXXZiALMTflj76A3h6rw3n06eWC0hs m9JbFcUXl27JYh+8dvd3lCn4N3g+UKGxunCpxUL0Kvf0P4X+bBoIpqatwD6MXWHcylr1 BH3RE7SBBA1MfHdOKRAVnSl7nanM346jQh7Kqe05Iz5kae/1dfsg2j41TQCJzAtf/uX8 lAYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LP4t6JFn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si5084854edc.254.2020.12.20.01.47.06; Sun, 20 Dec 2020 01:47:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LP4t6JFn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727253AbgLTJqb (ORCPT + 99 others); Sun, 20 Dec 2020 04:46:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38096 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbgLTJqb (ORCPT ); Sun, 20 Dec 2020 04:46:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608457504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hZuuWYgsYqtOq9pElDc1NbTuuW8utHaswvEIseLkrwU=; b=LP4t6JFnHEIXYUt3hsyrVaFGMqnNLltixmaxaqF2ZMXFeFDiCg+cdihCH3a0MjXTubfPpe zH4192iMiqCeY86VD65jYk7GcxAL+5LPiO/GFRnR69di9NUsBpzMrd39cdmYhbrHr7zvl3 SJR2j/lgUJVO8k8sxURljb+cmqHs/GM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-4szOjY9POcaa_QH5pkrEHg-1; Sun, 20 Dec 2020 04:45:00 -0500 X-MC-Unique: 4szOjY9POcaa_QH5pkrEHg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2AA7F15720; Sun, 20 Dec 2020 09:44:59 +0000 (UTC) Received: from [10.36.112.16] (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE42E5C1B4; Sun, 20 Dec 2020 09:44:57 +0000 (UTC) Subject: Re: [PATCH v1 1/4] s390/kvm: VSIE: stop leaking host addresses To: Claudio Imbrenda , linux-kernel@vger.kernel.org Cc: borntraeger@de.ibm.com, frankja@linux.ibm.com, kvm@vger.kernel.org, linux-s390@vger.kernel.org, stable@vger.kernel.org References: <20201218141811.310267-1-imbrenda@linux.ibm.com> <20201218141811.310267-2-imbrenda@linux.ibm.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Sun, 20 Dec 2020 10:44:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201218141811.310267-2-imbrenda@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.12.20 15:18, Claudio Imbrenda wrote: > The addresses in the SIE control block of the host should not be > forwarded to the guest. They are only meaningful to the host, and > moreover it would be a clear security issue. It's really almost impossible for someone without access to documentation to understand what we leak. I assume we're leaking the g1 address of a page table (entry), used for translation of g2->g3 to g1. Can you try making that clearer? In that case, it's pretty much a random number (of a random page used as a leave page table) and does not let g1 identify locations of symbols etc. If so, I don't think this is a "clear security issue" and suggest squashing this into the actual fix (#p4 I assume). @Christian, @Janosch? Am I missing something? > > Subsequent patches will actually put the right values in the guest SIE > control block. > > Fixes: a3508fbe9dc6d ("KVM: s390: vsie: initial support for nested virtualization") > Cc: stable@vger.kernel.org > Signed-off-by: Claudio Imbrenda > --- > arch/s390/kvm/vsie.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c > index 4f3cbf6003a9..ada49583e530 100644 > --- a/arch/s390/kvm/vsie.c > +++ b/arch/s390/kvm/vsie.c > @@ -416,11 +416,6 @@ static void unshadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) > memcpy((void *)((u64)scb_o + 0xc0), > (void *)((u64)scb_s + 0xc0), 0xf0 - 0xc0); > break; > - case ICPT_PARTEXEC: > - /* MVPG only */ > - memcpy((void *)((u64)scb_o + 0xc0), > - (void *)((u64)scb_s + 0xc0), 0xd0 - 0xc0); > - break; > } > > if (scb_s->ihcpu != 0xffffU) > -- Thanks, David / dhildenb