From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758907AbXJCSTS (ORCPT ); Wed, 3 Oct 2007 14:19:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753841AbXJCSTE (ORCPT ); Wed, 3 Oct 2007 14:19:04 -0400 Received: from extu-mxob-1.symantec.com ([216.10.194.28]:52887 "EHLO extu-mxob-1.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753662AbXJCSTC (ORCPT ); Wed, 3 Oct 2007 14:19:02 -0400 Date: Wed, 3 Oct 2007 19:18:23 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.wat.veritas.com To: Matt Mackall cc: Nick Piggin , linux-kernel Subject: Re: pgd_none_or_clear_bad strangeness? In-Reply-To: <20071003112527.GA10437@wotan.suse.de> Message-ID: References: <20071002222003.GL19691@waste.org> <20071003112527.GA10437@wotan.suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Oct 2007, Nick Piggin wrote: > On Tue, Oct 02, 2007 at 05:20:03PM -0500, Matt Mackall wrote: > > In lib/pagewalk.c, I've been using the various forms of > > {pgd,pud,pmd}_none_or_clear_bad while walking page tables as that > > seemed the canonical way to do things. Lately (eg with -rc7-mm1), > > these have been triggering messages like "bad pgd 0x01e3" and causing > > nasty double faults. It appears this is actually triggered at the pmd > > level (mm/memory.c:116), though it appears to produce the wrong > > message. I guess the "wrong message" is an artifact of pud/pmd folding; but I get too confused by the different levels myself to want to think more about it - I'll just assume it's "right" somehow ;) > > > > Has something changed here? I'm pretty sure this used to work! Is this I don't know of anything changing here, sorry. > > not a kosher thing to do? Does it make any sense I'd repeatedly run > > into a bad pmd in the middle of bash's page table right after boot? > > The simple _none variant seems to work, but I worry that it's papering > > over a real problem. > > No, I think that should be the right thing to do for userspace pages. > You're not walking into a hugetlb area or a kernel mapping are you? > (the bad pgd: line could be important... 0x01e3 would be a linear kernel > mapping I think?). I should have spent more time reading Nick's reply and less time trying to work it out for myself! Yes, that's the conclusion I came to, for some reason you're now going beyond the user vmas and walking into the linear kernel mapping, which has _PAGE_GLOBAL and _PAGE_PSE bits set. Hugh