From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Feb 2013 18:36:52 +0100 (CET) Received: from terminus.zytor.com ([198.137.202.10]:41315 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6827576Ab3BVRgvE1y8r (ORCPT ); Fri, 22 Feb 2013 18:36:51 +0100 Received: from tazenda.hos.anvin.org ([IPv6:2601:9:3340:26:e269:95ff:fe35:9f3c]) (authenticated bits=0) by mail.zytor.com (8.14.5/8.14.5) with ESMTP id r1MHXdwS012535 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 22 Feb 2013 09:33:39 -0800 Message-ID: <5127ABEE.8080303@zytor.com> Date: Fri, 22 Feb 2013 09:33:34 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Dave Hansen CC: Konrad Rzeszutek Wilk , "H. Peter Anvin" , Linus Torvalds , "David S. Miller" , "Rafael J. Wysocki" , stable@vger.kernel.org, Alexander Duyck , Andrea Arcangeli , Andrew Morton , Andrzej Pietrasiewicz , Arnd Bergmann , Borislav Petkov , Borislav Petkov , Christoph Lameter , Daniel J Blueman , Eric Biederman , Fenghua Yu , Frederic Weisbecker , Gleb Natapov , Gokul Caushik , "H. J. Lu" , Hugh Dickins , Ingo Molnar , Ingo Molnar , Jacob Shin , Jamie Lokier , Jarkko Sakkinen , Jeremy Fitzhardinge , Joe Millenbach , Joerg Roedel , Johannes Weiner , Josh Triplett , Kyungmin Park , Lee Schermerhorn , Len Brown , Linux Kernel Mailing List , Marcelo Tosatti , Marek Szyprowski , Matt Fleming , Mel Gorman , Paul Turner , Pavel Machek , Pekka Enberg , Peter Zijlstra , Ralf Baechle , Rik van Riel , Rob Landley , Russell King , Rusty Russell , Shuah Khan , Shuah Khan , Stefano Stabellini , Steven Rostedt , Thomas Gleixner , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Yasuaki Ishimatsu , Yinghai Lu , Zachary Amsden , avi@redhat.com, linux-mips@linux-mips.org, linux-pm@vger.kernel.org, mst@redhat.com, sparclinux@vger.kernel.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xensource.com Subject: Re: [GIT PULL] x86/mm changes for v3.9-rc1 References: <201302220034.r1M0Y6O8008311@terminus.zytor.com> <20130222165531.GA29308@phenom.dumpdata.com> <5127AB34.8090406@linux.vnet.ibm.com> In-Reply-To: <5127AB34.8090406@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 35812 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: hpa@zytor.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Return-Path: On 02/22/2013 09:30 AM, Dave Hansen wrote: > > Do you have CONFIG_DEBUG_VIRTUAL on? > > You're probably hitting the new BUG_ON() in __phys_addr(). It's > intended to detect places where someone is doing a __pa()/__phys_addr() > on an address that's outside the kernel's identity mapping. > > There are a lot of __pa() calls around there, but from the looks of it, > it's this code: > > static pgd_t *xen_get_user_pgd(pgd_t *pgd) > { > ... > if (offset < pgd_index(USER_LIMIT)) { > struct page *page = virt_to_page(pgd_page); > > I'm a bit fuzzy on exactly what the code is trying to do here. It could > mean either that the identity mapping isn't set up enough yet, or that > __pa() is getting called on a bogus address. > > I'm especially fuzzy on why we'd be calling anything that's looking at > userspace pagetables (xen_get_user_pgd() ??) this early in boot. > Ah yes, of course. This is unrelated to the early page table setups, which is why it didn't trip in Konrad's earlier testing. This debugging bits has already found real bugs in the kernel, and this might be another. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [GIT PULL] x86/mm changes for v3.9-rc1 Date: Fri, 22 Feb 2013 09:33:34 -0800 Message-ID: <5127ABEE.8080303@zytor.com> References: <201302220034.r1M0Y6O8008311@terminus.zytor.com> <20130222165531.GA29308@phenom.dumpdata.com> <5127AB34.8090406@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5127AB34.8090406@linux.vnet.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Dave Hansen Cc: linux-mips@linux-mips.org, Jeremy Fitzhardinge , Fenghua Yu , Frederic Weisbecker , Joe Millenbach , virtualization@lists.linux-foundation.org, Gokul Caushik , Ralf Baechle , Pavel Machek , sparclinux@vger.kernel.org, Christoph Lameter , Ingo Molnar , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Marek Szyprowski , Andrea Arcangeli , Lee Schermerhorn , xen-devel@lists.xensource.com, Russell King , Len Brown , Joerg Roedel , Stefano Stabellini , Hugh Dickins , Yasuaki Ishimatsu List-Id: linux-pm@vger.kernel.org On 02/22/2013 09:30 AM, Dave Hansen wrote: > > Do you have CONFIG_DEBUG_VIRTUAL on? > > You're probably hitting the new BUG_ON() in __phys_addr(). It's > intended to detect places where someone is doing a __pa()/__phys_addr() > on an address that's outside the kernel's identity mapping. > > There are a lot of __pa() calls around there, but from the looks of it, > it's this code: > > static pgd_t *xen_get_user_pgd(pgd_t *pgd) > { > ... > if (offset < pgd_index(USER_LIMIT)) { > struct page *page = virt_to_page(pgd_page); > > I'm a bit fuzzy on exactly what the code is trying to do here. It could > mean either that the identity mapping isn't set up enough yet, or that > __pa() is getting called on a bogus address. > > I'm especially fuzzy on why we'd be calling anything that's looking at > userspace pagetables (xen_get_user_pgd() ??) this early in boot. > Ah yes, of course. This is unrelated to the early page table setups, which is why it didn't trip in Konrad's earlier testing. This debugging bits has already found real bugs in the kernel, and this might be another. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.