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 --
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Linux 2.6.25-rc4 |
| Jon Smirl | Re: 463 kernel developers missing! |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: HTB accuracy for high speed |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
