Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2989116yba; Tue, 16 Apr 2019 02:12:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqylKG7t4I4o+8Z3+1ivUpm/Ji/N5+9pqMhc7FGqwC0QpqAVw2NicJV30cid1sFwfvHP5eJN X-Received: by 2002:a17:902:28ab:: with SMTP id f40mr59862861plb.297.1555405928856; Tue, 16 Apr 2019 02:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555405928; cv=none; d=google.com; s=arc-20160816; b=w2jXOMA4s9+SCnlIrcUvk3hV1KKAjpTU+W6RxqSfvF3S/iK5LXQgYFDGlcx+KFZmhk WSYotqkKjteG7mv+JoMdpmiZvhzBk1XORVZgTLoe7t66cDCQzAkLutreomAfD5Lmx+dV iTIoKWUtL/GKuaprOLYWgTWPoetfJ1FOhmcgCC9V6lDyGnFF7J7LRieFvyOt2DFoY/Lj o2xz/ziCmtCQDhcj6+EcEEjKdRzEdNSo1R5QyFn89Xe7nP88FQqLX5ZUyJT6UxbHw/10 PB6t5fttSTXtyepmNC9eMTnqjxsKDWo9TpZchTUlMCGbNBZNRfjFANZFnGh+WXUFw017 XcJg== 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 :mime-version:references:in-reply-to:subject:cc:to:from:date; bh=5qjPHpIFK44Nd/0fFQE9+PphWHsgIbJJ+ZVx6YA71jY=; b=Hs3ubBeJaz8lM65usARIisO4GnFzkMED9PFcJY29dyj9GlOgueUwacBHv8TBCoL1tg pG6JTRMqHTtcsI3xSobT++qFz+wKx0iEpFmOD3xfb1w49cVqg5Em2cBg06mH/U3u+tzu xVJRhTsNuFHf0HVS1GuX6cjZShdghfNjWwdD4RKhwz+Ju8dIapiBK7jsuuR+KhSocmK/ B/Q7Yx0cc1H613M/J3dg1VWJkXPGhvKDTZtdsvuhwiE+s7sExC5cpWem39n/NKtmRMd9 4OVu7aTfMXUt9eP9lq+YXFSl9KwCdmh8XY6uAHmaR934RXdWAgq+1hbFbGTYwcuRS25J pYYA== 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 y5si10937625plk.75.2019.04.16.02.11.52; Tue, 16 Apr 2019 02:12:08 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728913AbfDPJJQ (ORCPT + 99 others); Tue, 16 Apr 2019 05:09:16 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53176 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728770AbfDPJJP (ORCPT ); Tue, 16 Apr 2019 05:09:15 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3G8whfx120229 for ; Tue, 16 Apr 2019 05:09:14 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rwb22avk0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Apr 2019 05:09:13 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Apr 2019 10:09:11 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 16 Apr 2019 10:09:08 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3G998l325624708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Apr 2019 09:09:08 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F11CB42045; Tue, 16 Apr 2019 09:09:07 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B95A342042; Tue, 16 Apr 2019 09:09:07 +0000 (GMT) Received: from mschwideX1 (unknown [9.152.212.60]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 16 Apr 2019 09:09:07 +0000 (GMT) Date: Tue, 16 Apr 2019 11:09:06 +0200 From: Martin Schwidefsky To: Linus Torvalds Cc: Christoph Hellwig , Linux List Kernel Mailing , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-s390 Subject: Re: Linux 5.1-rc5 In-Reply-To: References: <20190415051919.GA31481@infradead.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19041609-0012-0000-0000-0000030F52A4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19041609-0013-0000-0000-000021478AB9 Message-Id: <20190416110906.6c773aff@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-16_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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904160063 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Apr 2019 09:17:10 -0700 Linus Torvalds wrote: > On Sun, Apr 14, 2019 at 10:19 PM Christoph Hellwig wrote: > > > > Can we please have the page refcount overflow fixes out on the list > > for review, even if it is after the fact? > > They were actually on a list for review long before the fact, but it > was the security mailing list. The issue actually got discussed back > in January along with early versions of the patches, but then we > dropped the ball because it just wasn't on anybody's radar and it got > resurrected late March. Willy wrote a rather bigger patch-series, and > review of that is what then resulted in those commits. So they may > look recent, but that's just because the original patches got > seriously edited down and rewritten. First time I hear about this, thanks for the heads up. > That said, powerpc and s390 should at least look at maybe adding a > check for the page ref in their gup paths too. Powerpc has the special > gup_hugepte() case, and s390 has its own version of gup entirely. I > was actually hoping the s390 guys would look at using the generic gup > code. We did look at converting the s390 gup code to CONFIG_HAVE_GENERIC_GUP, there are some details that need careful consideration. The top one is access_ok(), for s390 we always return true. The generic gup code relies on the fact that a page table walk with a specific address is doable if access_ok() returned true, the s390 specific check is slightly different: if ((end <= start) || (end > mm->context.asce_limit)) return 0; The obvious approach would be to modify access_ok() to check against the asce_limit. I will try and see if anything breaks, e.g. the automatic page table upgrade. > I ruthlessly also entirely ignored MIPS, SH and sparc, since they seem > largely irrelevant, partly since even theoretically this whole issue > needs a _lot_ of memory. > > Michael, Martin, see commit 6b3a70773630 ("Merge branch 'page-refs' > (page ref overflow)"). You may or may not really care. On s390 we can have up to 16TB of memory in a single LPAR. So yes, I do care about it. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.