From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CED1C433EF for ; Tue, 28 Sep 2021 10:59:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ADEB760FF2 for ; Tue, 28 Sep 2021 10:59:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ADEB760FF2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 00F0C900003; Tue, 28 Sep 2021 06:59:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F0008900002; Tue, 28 Sep 2021 06:59:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D79C7900003; Tue, 28 Sep 2021 06:59:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0119.hostedemail.com [216.40.44.119]) by kanga.kvack.org (Postfix) with ESMTP id C561A900002 for ; Tue, 28 Sep 2021 06:59:33 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 71ED11802BABD for ; Tue, 28 Sep 2021 10:59:33 +0000 (UTC) X-FDA: 78636686226.05.62463A6 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf25.hostedemail.com (Postfix) with ESMTP id F07FFB000185 for ; Tue, 28 Sep 2021 10:59:32 +0000 (UTC) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18SAhw1m021117; Tue, 28 Sep 2021 06:59:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=VaZ6LXUtqAzNENOKVVw668FIko8Tk+skMoDZhD6+XiY=; b=ByT5ME0DLZZNbTMXXkoL9pCjPsWt1eaOT92qk/1aRreLdEtUjfC2hEDMe8LMDkbo7a2A elNh+16Xl/FC1bPYFBstbzMUn9AbvrQCEKdldgtIlEsvTAxijax5O8U64i3QS4tGZfAq seKVKWrxffGlZDxzMPSnOPeCNazuOKiwZwSqkzf6MtMx61aFO3S7b7CNMuRxbTRCEpcK oazupowxR/yrl+9dtTe91GgNPCqv9lms6ee4fLjWQ4eThMuC6+Eozzdu8bSnN1wN2/xl iMYYr/xM7xM32beTWrEOZwzA7ssjGYjGQze3Z3JDuayh5QO+CBv+W6mZ4mXWoPeHsTYB Yg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bby6qbd0c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 06:59:31 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 18SAIYXa017905; Tue, 28 Sep 2021 06:59:31 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bby6qbcyr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 06:59:31 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 18SArGBB026263; Tue, 28 Sep 2021 10:59:29 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3b9u1jd0hf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 10:59:29 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 18SAxP2Z40042980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Sep 2021 10:59:25 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 45605A407D; Tue, 28 Sep 2021 10:59:25 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF8F7A407C; Tue, 28 Sep 2021 10:59:24 +0000 (GMT) Received: from osiris (unknown [9.145.163.77]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 28 Sep 2021 10:59:24 +0000 (GMT) Date: Tue, 28 Sep 2021 12:59:23 +0200 From: Heiko Carstens To: David Hildenbrand , Christian Borntraeger Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, Janosch Frank , Cornelia Huck , Claudio Imbrenda , Vasily Gorbik , Niklas Schnelle , Gerald Schaefer , Ulrich Weigand Subject: Re: [PATCH resend RFC 0/9] s390: fixes, cleanups and optimizations for page table walkers Message-ID: References: <20210909162248.14969-1-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210909162248.14969-1-david@redhat.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: X7BnRuUbNGzOF28ea2UELvb6rVeoVpsC X-Proofpoint-ORIG-GUID: bA0QBMuJiIPOxbNUT32b4jaARuTjaXLM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-28_05,2021-09-28_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 phishscore=0 mlxscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109280061 X-Rspamd-Queue-Id: F07FFB000185 X-Stat-Signature: 78dfzw3bg6qj8bgiimyhib5w33qf56i6 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=ByT5ME0D; spf=pass (imf25.hostedemail.com: domain of hca@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=hca@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-Rspamd-Server: rspam06 X-HE-Tag: 1632826772-47711 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Sep 09, 2021 at 06:22:39PM +0200, David Hildenbrand wrote: > Resend because I missed ccing people on the actual patches ... > > RFC because the patches are essentially untested and I did not actually > try to trigger any of the things these patches are supposed to fix. It > merely matches my current understanding (and what other code does :) ). I > did compile-test as far as possible. > > After learning more about the wonderful world of page tables and their > interaction with the mmap_sem and VMAs, I spotted some issues in our > page table walkers that allow user space to trigger nasty behavior when > playing dirty tricks with munmap() or mmap() of hugetlb. While some issues > should be hard to trigger, others are fairly easy because we provide > conventient interfaces (e.g., KVM_S390_GET_SKEYS and KVM_S390_SET_SKEYS). > > Future work: > - Don't use get_locked_pte() when it's not required to actually allocate > page tables -- similar to how storage keys are now handled. Examples are > get_pgste() and __gmap_zap. > - Don't use get_locked_pte() and instead let page fault logic allocate page > tables when we actually do need page tables -- also, similar to how > storage keys are now handled. Examples are set_pgste_bits() and > pgste_perform_essa(). > - Maybe switch to mm/pagewalk.c to avoid custom page table walkers. For > __gmap_zap() that's very easy. > > Cc: Christian Borntraeger > Cc: Janosch Frank > Cc: Cornelia Huck > Cc: Claudio Imbrenda > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Niklas Schnelle > Cc: Gerald Schaefer > Cc: Ulrich Weigand For the whole series: Acked-by: Heiko Carstens Christian, given that this is mostly about KVM I'd assume this should go via the KVM tree. Patch 6 (pci_mmio) is already upstream.