From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751120AbdFALjq (ORCPT ); Thu, 1 Jun 2017 07:39:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60905 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdFALjp (ORCPT ); Thu, 1 Jun 2017 07:39:45 -0400 Subject: Re: [PATCH RFC 1/2] s390x: mm: allow mixed page table types (2k and 4k) To: David Hildenbrand , kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , Thomas Huth References: <20170529163202.13077-1-david@redhat.com> <20170529163202.13077-2-david@redhat.com> From: Christian Borntraeger Date: Thu, 1 Jun 2017 13:39:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170529163202.13077-2-david@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-IE Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17060111-0012-0000-0000-0000145CE025 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007153; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00868654; UDB=6.00431710; IPR=6.00648529; BA=6.00005390; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015665; XFM=3.00000015; UTC=2017-06-01 11:39:43 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17060111-0013-0000-0000-00004DEDF57F Message-Id: <2a3d5383-cab4-6882-4050-c69404bda347@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-01_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706010214 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/29/2017 06:32 PM, David Hildenbrand wrote: > new = old = pgste_get_lock(ptep); > pgste_val(new) &= ~(PGSTE_GR_BIT | PGSTE_GC_BIT | > @@ -748,6 +764,11 @@ int reset_guest_reference_bit(struct mm_struct *mm, unsigned long addr) > ptep = get_locked_pte(mm, addr, &ptl); > if (unlikely(!ptep)) > return -EFAULT; > + if (!pgtable_has_pgste(mm, __pa(ptep))) { > + pte_unmap_unlock(ptep, ptl); > + WARN_ONCE(true, "Guest address on page table without pgste"); All these WARN_ONCE. Is there a way how a malicious user can trigger this or is this checked everywhere and triggered would be indeed a bug?