Hi, Michael Kerrisk wrote:MMIO pages have been not dumped since a long time ago, and I didn't target them for the coredump_filter feature because I thought it was generally danger to read MMIO pages. As for frame buffer we would be able to safely access to it, but there is no way to tell it from other MMIO mappings, AFAIK. The following patch may help. To dump MMIO pages, set bit 5 of coredump_filter. $ echo 0x23 > /proc/<PID>/coredump_filter Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> --- This patch is not intended to be merged to the upstream kernel because the safeness of reading VM_IO mappings has not been proved. Index: linux-2.6.26-rc5-mm3/fs/binfmt_elf.c =================================================================== --- linux-2.6.26-rc5-mm3.orig/fs/binfmt_elf.c +++ linux-2.6.26-rc5-mm3/fs/binfmt_elf.c @@ -1141,11 +1141,18 @@ static unsigned long vma_dump_size(struc if (vma->vm_flags & VM_ALWAYSDUMP) goto whole; - /* Do not dump I/O mapped devices or special mappings */ - if (vma->vm_flags & (VM_IO | VM_RESERVED)) +#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) + + /* By default, do not dump memory mapped I/O mappings */ + if (vma->vm_flags & VM_IO) { + if (FILTER(MMIO)) + goto whole; return 0; + } -#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) + /* Do not dump special mappings */ + if (vma->vm_flags & VM_RESERVED) + return 0; /* By default, dump shared memory if mapped from an anonymous file. */ if (vma->vm_flags & VM_SHARED) { Index: linux-2.6.26-rc5-mm3/include/linux/sched.h =================================================================== --- linux-2.6.26-rc5-mm3.orig/include/linux/sched.h +++ linux-2.6.26-rc5-mm3/include/linux/sched.h @@ -403,8 +403,9 @@ extern int get_dumpable(struct mm_struct #define MMF_DUMP_MAPPED_PRIVATE 4 #define MMF_DUMP_MAPPED_SHARED 5 #define MMF_DUMP_ELF_HEADERS 6 +#define MMF_DUMP_MMIO 7 #define MMF_DUMP_FILTER_SHIFT MMF_DUMPABLE_BITS -#define MMF_DUMP_FILTER_BITS 5 +#define MMF_DUMP_FILTER_BITS 6 #define MMF_DUMP_FILTER_MASK \ (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT) #define MMF_DUMP_FILTER_DEFAULT \ Regards, -- Hidehiro Kawai Hitachi, Systems Development Laboratory Linux Technology Center --
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 010/196] Chinese: add translation of Codingstyle |
| Andrew Morton | -mm merge plans for 2.6.23 |
git: | |
| Gerrit Renker | [PATCH 24/37] dccp: Processing Confirm options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Alexey Dobriyan | Re: [GIT]: Networking |
| david | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
