From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753462AbdKNHVK (ORCPT ); Tue, 14 Nov 2017 02:21:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:58430 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbdKNHVC (ORCPT ); Tue, 14 Nov 2017 02:21:02 -0500 Date: Tue, 14 Nov 2017 08:21:00 +0100 From: Michal Hocko To: Minchan Kim Cc: Wang Nan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, will.deacon@arm.com, Bob Liu , Andrew Morton , David Rientjes , Ingo Molnar , Roman Gushchin , Konstantin Khlebnikov , Andrea Arcangeli Subject: Re: [PATCH] arch, mm: introduce arch_tlb_gather_mmu_lazy (was: Re: [RESEND PATCH] mm, oom_reaper: gather each vma to prevent) leaking TLB entry Message-ID: <20171114072100.uwkbakxzdkroga7r@dhcp22.suse.cz> References: <20171107095453.179940-1-wangnan0@huawei.com> <20171110001933.GA12421@bbox> <20171110101529.op6yaxtdke2p4bsh@dhcp22.suse.cz> <20171110122635.q26xdxytgdfjy5q3@dhcp22.suse.cz> <20171113002833.GA18301@bbox> <20171113095107.24hstywywxk7nx7e@dhcp22.suse.cz> <20171114014549.GA1995@bgram> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114014549.GA1995@bgram> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 14-11-17 10:45:49, Minchan Kim wrote: [...] > Anyway, I think Wang Nan's patch is already broken. > http://lkml.kernel.org/r/%3C20171107095453.179940-1-wangnan0@huawei.com%3E > > Because unmap_page_range(ie, zap_pte_range) can flush TLB forcefully > and free pages. However, the architecture code for TLB flush cannot > flush at all by wrong fullmm so other threads can write freed-page. I am not sure I understand what you mean. How is that any different from any other explicit partial madvise call? -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 85BBF6B0033 for ; Tue, 14 Nov 2017 02:21:04 -0500 (EST) Received: by mail-pf0-f198.google.com with SMTP id 27so5486258pft.8 for ; Mon, 13 Nov 2017 23:21:04 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id c69si16847980pfl.193.2017.11.13.23.21.03 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 13 Nov 2017 23:21:03 -0800 (PST) Date: Tue, 14 Nov 2017 08:21:00 +0100 From: Michal Hocko Subject: Re: [PATCH] arch, mm: introduce arch_tlb_gather_mmu_lazy (was: Re: [RESEND PATCH] mm, oom_reaper: gather each vma to prevent) leaking TLB entry Message-ID: <20171114072100.uwkbakxzdkroga7r@dhcp22.suse.cz> References: <20171107095453.179940-1-wangnan0@huawei.com> <20171110001933.GA12421@bbox> <20171110101529.op6yaxtdke2p4bsh@dhcp22.suse.cz> <20171110122635.q26xdxytgdfjy5q3@dhcp22.suse.cz> <20171113002833.GA18301@bbox> <20171113095107.24hstywywxk7nx7e@dhcp22.suse.cz> <20171114014549.GA1995@bgram> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114014549.GA1995@bgram> Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: Wang Nan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, will.deacon@arm.com, Bob Liu , Andrew Morton , David Rientjes , Ingo Molnar , Roman Gushchin , Konstantin Khlebnikov , Andrea Arcangeli On Tue 14-11-17 10:45:49, Minchan Kim wrote: [...] > Anyway, I think Wang Nan's patch is already broken. > http://lkml.kernel.org/r/%3C20171107095453.179940-1-wangnan0@huawei.com%3E > > Because unmap_page_range(ie, zap_pte_range) can flush TLB forcefully > and free pages. However, the architecture code for TLB flush cannot > flush at all by wrong fullmm so other threads can write freed-page. I am not sure I understand what you mean. How is that any different from any other explicit partial madvise call? -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org