Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp566118pxv; Thu, 22 Jul 2021 07:08:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5wMvGDeWxBq32m8tMoUHZqMDxILoMounoj1hY4q2o38ZwdrbFcdTjYJbAJbS+vgKWzaAs X-Received: by 2002:a17:906:2b85:: with SMTP id m5mr69358ejg.141.1626962879772; Thu, 22 Jul 2021 07:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626962879; cv=none; d=google.com; s=arc-20160816; b=YuvwVfT7VpyWtxG45DuhiuEJ/twb3zKo0SGSCv1r4EzG/9zTV8dAM1a/NSFKJnOXnY SYOh4FuhG9A63XRjuguFT/2oD261X4VFvLXd/plDItTNlEkmgrtZ7IvZHH+FuiPfeo4C kHghhztDzPWJf8jIxcUWLlVHaNnPPh7t6qEj1vjmzlsIqdqpVZluQsKnO8EHX4qAMKtC yrUldBEadS99N/P2NoK3P1zYv5f4j9aRAHL9lUVNLzrzW1y/49xWp/gpEe2xQtHusUv1 LIuikagYCVIDp2/nSMof29voUlpL+kn1hK/bgw9BKX5+fnPLZR2IZUN7jLNyHmJIW5Ut UNUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9GRrzopeTN8J3Gl6WugzuyYMUTQNr88Ol+usBswOnTw=; b=l38l4ayUmSg1e3Vgpf+k8+Bet67l7KP/ai1yuh/jPuGvrqOHzMPbnNFdwnaekW0TBB MN+so4T5PtCV31++cZMbXxh7SGPyC1dJgWJfaWjgM1QwcGUaJFOEGQ7s8B+171zjgVfm bzNAObzPTVCHltE4+z1USJT5iaZAIFYJq7tubWPyWxZJimakAHliReXo90l+aMJtiEc7 LlZtD87fUxjY/5hV5XI81M8bFmMCuihNl89Y7XXsWyRdW+paE3y6ilqeWdy82XO1u7ed VhhmWkW3f6J9mjGnvLkXsH9HXqPOCAnWdYfN/NjAQg7VZOTtbo+xg/egTzMg/+ohYED4 k9LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z7JSVXsi; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si8839440eje.573.2021.07.22.07.07.28; Thu, 22 Jul 2021 07:07:59 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=Z7JSVXsi; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbhGVNYc (ORCPT + 99 others); Thu, 22 Jul 2021 09:24:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:37780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232198AbhGVNYb (ORCPT ); Thu, 22 Jul 2021 09:24:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EE4366128A; Thu, 22 Jul 2021 14:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626962705; bh=HQV3ltpdioq332rYU8MEJmqXRNGg6NdmH1xEjz8aR4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z7JSVXsi1oU841lt24JeiDTQzvl9R/UX0GUoun33l7BcsCE6FDp3IqesLm5iMAfMX Ahu+uU8fAbUpCSmpLlshrTyp0eN6rwFjrf6NAiqJwOqH2KP7jiJuC+he6eVvqtztXO 1OeTb0yRjxr51xP50yrlhmApOo3y29Kq/d8bKPmU= Date: Thu, 22 Jul 2021 16:05:02 +0200 From: Greg KH To: Hugh Dickins Cc: Peter Xu , stable , linux-kernel , linux-mm , Igor Raits , Hillf Danton , Axel Rasmussen , Andrew Morton Subject: Re: [PATCH stable 5.10.y 0/2] mm/thp: Fix uffd-wp with fork(); crash on pmd migration entry on fork Message-ID: References: <796cbb7-5a1c-1ba0-dde5-479aba8224f2@google.com> <20210720155657.499127-1-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 01:38:53PM -0700, Hugh Dickins wrote: > On Tue, Jul 20, 2021 at 8:57 AM Peter Xu wrote: > > > > In summary, this series should be needed for 5.10/5.12/5.13. This is the 5.10.y > > backport of the series. Patch 1 is a dependency of patch 2, while patch 2 > > should be the real fix. > > > > There's a minor conflict on patch 2 when cherry pick due to not having the new > > helper called page_needs_cow_for_dma(). It's also mentioned at the entry of > > patch 2. > > > > This series should be able to fix a rare race that mentioned in thread: > > > > https://lore.kernel.org/linux-mm/796cbb7-5a1c-1ba0-dde5-479aba8224f2@google.com/ > > > > This fact wasn't discovered when the fix got proposed and merged, because the > > fix was originally about uffd-wp and its fork event. However it turns out that > > the problematic commit b569a1760782f3d is also causing crashing on fork() of > > pmd migration entries which is even more severe than the original uffd-wp > > problem. > > > > Stable kernels at least on 5.12.y has the crash reproduced, and it's possible > > 5.13.y and 5.10.y could hit it due to having the problematic commit > > b569a1760782f3d but lacking of the uffd-wp fix patch (8f34f1eac382, which is > > also patch 2 of this series). > > > > The pmd entry crash problem was reported by Igor Raits and > > debugged by Hugh Dickins . > > > > Please review, thanks. > > And these two for 5.10.y look good to me also: I'm glad you decided in > the end to keep 5.10's support for uffd-wp-fork. > The first is just a straight cherry-pick of > 5fc7a5f6fd04bc18f309d9f979b32ef7d1d0a997, but as you noted above, > 8f34f1eac3820fc2722e5159acceb22545b30b0d needed one line of fixup for > that tree. All now queued up, thanks. greg k-h