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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FC8DC10F14 for ; Wed, 17 Apr 2019 03:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 201A22177B for ; Wed, 17 Apr 2019 03:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731121AbfDQDii (ORCPT ); Tue, 16 Apr 2019 23:38:38 -0400 Received: from ozlabs.org ([203.11.71.1]:45247 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728508AbfDQDii (ORCPT ); Tue, 16 Apr 2019 23:38:38 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 44kSd76Crfz9s9G; Wed, 17 Apr 2019 13:38:35 +1000 (AEST) From: Michael Ellerman To: Linus Torvalds , Christoph Hellwig Cc: Linux List Kernel Mailing , linuxppc-dev@lists.ozlabs.org, Martin Schwidefsky , linux-s390 , Nicholas Piggin , "Aneesh Kumar K.V" , Paul Mackerras Subject: Re: Linux 5.1-rc5 In-Reply-To: References: <20190415051919.GA31481@infradead.org> Date: Wed, 17 Apr 2019 13:38:33 +1000 Message-ID: <87sguhti6e.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Cc += Nick & Aneesh & Paul ] Linus Torvalds writes: > 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. > > 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 Which uses page_cache_add_speculative(), which handles the case of the refcount being zero but not overflow. So that looks like it needs fixing. We also have follow_huge_pd() that should use try_get_page(). And we have a few uses of bare get_page() in KVM code which might be subject to the same attack. cheers