Return-Path: Received: from imap1.codethink.co.uk ([176.9.8.82]:53767 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932913AbeFKMzZ (ORCPT ); Mon, 11 Jun 2018 08:55:25 -0400 Message-ID: <1528721717.2289.114.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 051/268] asm-generic: provide generic_pmdp_establish() From: Ben Hutchings To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, "Kirill A. Shutemov" , Vlastimil Babka , Andrea Arcangeli , Michal Hocko , "Aneesh Kumar K.V" , Catalin Marinas , David Daney , David Miller , "H. Peter Anvin" , Hugh Dickins , Ingo Molnar , Martin Schwidefsky , Nitin Gupta , Ralf Baechle , Thomas Gleixner , Vineet Gupta , Andrew Morton , Linus Torvalds , Sasha Levin Date: Mon, 11 Jun 2018 13:55:17 +0100 In-Reply-To: <20180528100207.739905012@linuxfoundation.org> References: <20180528100202.045206534@linuxfoundation.org> <20180528100207.739905012@linuxfoundation.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On Mon, 2018-05-28 at 12:00 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: "Kirill A. Shutemov" > > [ Upstream commit c58f0bb77ed8bf93dfdde762b01cb67eebbdfc29 ] > > Patch series "Do not lose dirty bit on THP pages", v4. > > Vlastimil noted that pmdp_invalidate() is not atomic and we can lose > dirty and access bits if CPU sets them after pmdp dereference, but > before set_pmd_at(). > > The bug can lead to data loss, but the race window is tiny and I haven't > seen any reports that suggested that it happens in reality.  So I don't > think it worth sending it to stable. [...] > This patch (of 12): > > This is an implementation of pmdp_establish() that is only suitable for > an architecture that doesn't have hardware dirty/accessed bits.  In this > case we can't race with CPU which sets these bits and non-atomic > approach is fine. [...] There's no point in applying just this patch, since it adds a new function that nothing will call. I tend to think that since this is fixing a potential data loss, the whole series should be backported. But the commit message here says it shouldn't. Ben. -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom