Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752623AbbFNUHh (ORCPT ); Sun, 14 Jun 2015 16:07:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49329 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbbFNUHa (ORCPT ); Sun, 14 Jun 2015 16:07:30 -0400 Date: Sun, 14 Jun 2015 22:06:23 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andy Lutomirski , Andrew Morton , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Thomas Gleixner , Waiman Long Subject: Re: why do we need vmalloc_sync_all? Message-ID: <20150614200623.GB19582@redhat.com> References: <1434188955-31397-1-git-send-email-mingo@kernel.org> <20150613185828.GA32376@redhat.com> <20150614075943.GA810@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150614075943.GA810@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 43 On 06/14, Ingo Molnar wrote: > > * Oleg Nesterov wrote: > > > I didn't read v2 yet, but I'd like to ask a question. > > > > Why do we need vmalloc_sync_all()? > > > > It has a single caller, register_die_notifier() which calls it without > > any explanation. IMO, this needs a comment at least. > > Yes, it's used to work around crashes in modular callbacks: if the callbacks > happens to be called from within the page fault path, before the vmalloc page > fault handler runs, then we have a catch-22 problem. > > It's rare but not entirely impossible. But again, the kernel no longer does this? do_page_fault() does vmalloc_fault() without notify_die(). If it fails, I do not see how/why a modular DIE_OOPS handler could try to resolve this problem and trigger another fault. > > I am not sure I understand the changelog in 101f12af correctly, but at first > > glance vmalloc_sync_all() is no longer needed at least on x86, do_page_fault() > > no longer does notify_die(DIE_PAGE_FAULT). And btw DIE_PAGE_FAULT has no users. > > DIE_MNI too... > > > > Perhaps we can simply kill it on x86? > > So in theory we could still have it run from DIE_OOPS, and that could turn a > survivable kernel crash into a non-survivable one. I don't understand... But OK, my understanding of this magic is very limited, please forget. Thanks, Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/