From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753701Ab3FFVcU (ORCPT ); Thu, 6 Jun 2013 17:32:20 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:62592 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753219Ab3FFVcS (ORCPT ); Thu, 6 Jun 2013 17:32:18 -0400 From: Arnd Bergmann To: HATAYAMA Daisuke Cc: vgoyal@redhat.com, ebiederm@xmission.com, akpm@linux-foundation.org, cpw@sgi.com, kumagai-atsushi@mxc.nes.nec.co.jp, lisa.mitchell@hp.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, zhangyanfei@cn.fujitsu.com, jingbai.ma@hp.com, linux-mm@kvack.org, riel@redhat.com, walken@google.com, hughd@google.com, kosaki.motohiro@jp.fujitsu.com Subject: Re: [PATCH v8 9/9] vmcore: support mmap() on /proc/vmcore Date: Thu, 06 Jun 2013 23:31:41 +0200 Message-ID: <10307835.fkACLi6FUD@wuerfel> User-Agent: KMail/4.10.3 (Linux/3.9.0-2-generic; KDE/4.10.3; x86_64; ; ) In-Reply-To: <20130523052547.13864.83306.stgit@localhost6.localdomain6> References: <20130523052421.13864.83978.stgit@localhost6.localdomain6> <20130523052547.13864.83306.stgit@localhost6.localdomain6> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V02:K0:/OP5U+LFbE1UyXG0Tuic557hGGGIrntovwtUXnR0cT4 DRQdn1pEimRlkhrMIV038RIr5f95lFvaXMn94G/RMDGpLNc8k7 SkbQlpQk73WUA1KjOdjVnUpVY1xP+Ar3BUkkI/5tWdlQFkMxtx 6cmpNZVkG9khOW1LvNF1EXj1r3z80YxfsP3vf2JhuIVECROm1A 8ggK1HF3ddVjNxM3kboDNCoSv9+wiL4tXyXM1O0cluS9jeOK9S y+4UcXLMm9TewRbVjadANmuD1WL+5mTBSM399xqQbCiuuYdSU6 IJu9FX2K04gED57QiHLXoH4k1XQ9l3VbMVHxhc311YvRxwfV5B H360S4gDDJHQ4qV2g/Ts= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 23 May 2013 14:25:48 HATAYAMA Daisuke wrote: > This patch introduces mmap_vmcore(). > > Don't permit writable nor executable mapping even with mprotect() > because this mmap() is aimed at reading crash dump memory. > Non-writable mapping is also requirement of remap_pfn_range() when > mapping linear pages on non-consecutive physical pages; see > is_cow_mapping(). > > Set VM_MIXEDMAP flag to remap memory by remap_pfn_range and by > remap_vmalloc_range_pertial at the same time for a single > vma. do_munmap() can correctly clean partially remapped vma with two > functions in abnormal case. See zap_pte_range(), vm_normal_page() and > their comments for details. > > On x86-32 PAE kernels, mmap() supports at most 16TB memory only. This > limitation comes from the fact that the third argument of > remap_pfn_range(), pfn, is of 32-bit length on x86-32: unsigned long. > > Signed-off-by: HATAYAMA Daisuke > Acked-by: Vivek Goyal I get build errors on 'make randconfig' from this, when building NOMMU kernels on ARM. I suppose the new feature should be hidden in #ifdef CONFIG_MMU. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx122.postini.com [74.125.245.122]) by kanga.kvack.org (Postfix) with SMTP id 897006B0036 for ; Thu, 6 Jun 2013 17:31:49 -0400 (EDT) From: Arnd Bergmann Subject: Re: [PATCH v8 9/9] vmcore: support mmap() on /proc/vmcore Date: Thu, 06 Jun 2013 23:31:41 +0200 Message-ID: <10307835.fkACLi6FUD@wuerfel> In-Reply-To: <20130523052547.13864.83306.stgit@localhost6.localdomain6> References: <20130523052421.13864.83978.stgit@localhost6.localdomain6> <20130523052547.13864.83306.stgit@localhost6.localdomain6> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: owner-linux-mm@kvack.org List-ID: To: HATAYAMA Daisuke Cc: vgoyal@redhat.com, ebiederm@xmission.com, akpm@linux-foundation.org, cpw@sgi.com, kumagai-atsushi@mxc.nes.nec.co.jp, lisa.mitchell@hp.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, zhangyanfei@cn.fujitsu.com, jingbai.ma@hp.com, linux-mm@kvack.org, riel@redhat.com, walken@google.com, hughd@google.com, kosaki.motohiro@jp.fujitsu.com On Thursday 23 May 2013 14:25:48 HATAYAMA Daisuke wrote: > This patch introduces mmap_vmcore(). > > Don't permit writable nor executable mapping even with mprotect() > because this mmap() is aimed at reading crash dump memory. > Non-writable mapping is also requirement of remap_pfn_range() when > mapping linear pages on non-consecutive physical pages; see > is_cow_mapping(). > > Set VM_MIXEDMAP flag to remap memory by remap_pfn_range and by > remap_vmalloc_range_pertial at the same time for a single > vma. do_munmap() can correctly clean partially remapped vma with two > functions in abnormal case. See zap_pte_range(), vm_normal_page() and > their comments for details. > > On x86-32 PAE kernels, mmap() supports at most 16TB memory only. This > limitation comes from the fact that the third argument of > remap_pfn_range(), pfn, is of 32-bit length on x86-32: unsigned long. > > Signed-off-by: HATAYAMA Daisuke > Acked-by: Vivek Goyal I get build errors on 'make randconfig' from this, when building NOMMU kernels on ARM. I suppose the new feature should be hidden in #ifdef CONFIG_MMU. Arnd -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.187]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ukhne-0003Nu-Ou for kexec@lists.infradead.org; Thu, 06 Jun 2013 21:32:51 +0000 From: Arnd Bergmann Subject: Re: [PATCH v8 9/9] vmcore: support mmap() on /proc/vmcore Date: Thu, 06 Jun 2013 23:31:41 +0200 Message-ID: <10307835.fkACLi6FUD@wuerfel> In-Reply-To: <20130523052547.13864.83306.stgit@localhost6.localdomain6> References: <20130523052421.13864.83978.stgit@localhost6.localdomain6> <20130523052547.13864.83306.stgit@localhost6.localdomain6> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: HATAYAMA Daisuke Cc: riel@redhat.com, hughd@google.com, jingbai.ma@hp.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, lisa.mitchell@hp.com, linux-mm@kvack.org, kumagai-atsushi@mxc.nes.nec.co.jp, ebiederm@xmission.com, kosaki.motohiro@jp.fujitsu.com, zhangyanfei@cn.fujitsu.com, akpm@linux-foundation.org, walken@google.com, cpw@sgi.com, vgoyal@redhat.com On Thursday 23 May 2013 14:25:48 HATAYAMA Daisuke wrote: > This patch introduces mmap_vmcore(). > > Don't permit writable nor executable mapping even with mprotect() > because this mmap() is aimed at reading crash dump memory. > Non-writable mapping is also requirement of remap_pfn_range() when > mapping linear pages on non-consecutive physical pages; see > is_cow_mapping(). > > Set VM_MIXEDMAP flag to remap memory by remap_pfn_range and by > remap_vmalloc_range_pertial at the same time for a single > vma. do_munmap() can correctly clean partially remapped vma with two > functions in abnormal case. See zap_pte_range(), vm_normal_page() and > their comments for details. > > On x86-32 PAE kernels, mmap() supports at most 16TB memory only. This > limitation comes from the fact that the third argument of > remap_pfn_range(), pfn, is of 32-bit length on x86-32: unsigned long. > > Signed-off-by: HATAYAMA Daisuke > Acked-by: Vivek Goyal I get build errors on 'make randconfig' from this, when building NOMMU kernels on ARM. I suppose the new feature should be hidden in #ifdef CONFIG_MMU. Arnd _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec