Re: mmap'ed memory in core files ?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hidehiro Kawai <hidehiro.kawai.ez@...>
Cc: Michael Kerrisk <mtk.manpages@...>, Michael Kerrisk <mtk.manpages@...>, <linux-kernel@...>, <libdc1394-devel@...>, <stefanr@...>, sugita <yumiko.sugita.yf@...>, Satoshi OSHIMA <satoshi.oshima.fk@...>
Date: Thursday, July 3, 2008 - 5:22 am

Hello Hidehiro,

On Thu, Jul 03, 2008 at 12:51:33PM +0900, Hidehiro Kawai wrote:

Thanks for your patch, but it will not help here. Before applying it blindly
I asked myself if the mmapped region was tagged VM_IO, because it is actually
a simple ram zone, not an I/O zone, and the answer is it is not a VM_IO zone.
Details :

drivers/ieee1394/video1394.c:
    static int video1394_mmap(struct file *file, struct vm_area_struct *vma)
    {
    [...]
    return dma_region_mmap(&ctx->current_ctx->dma, file, vma);
    }

drivers/ieee1394/dma.c:
    int dma_region_mmap(struct dma_region *dma, struct file *file,
			struct vm_area_struct *vma)
    {
    [...]
    vma->vm_ops = &dma_region_vm_ops;
    vma->vm_private_data = dma;
    vma->vm_file = file;
    vma->vm_flags |= VM_RESERVED;

    return 0;
    }

So, actually the zone I would like to get dumped in the core file is tagged
VM_RESERVED.

I see the following ways to solve my problem :
    - do not tag the zone as VM_RESERVED in ieee1394::dma_region_mmap
    - tag the zone as VM_ALWAYSDUMP in ieee1394::dma_region_mmap
    - add a bit in coredump_filter to dump the VM_RESERVED zones.

As I don't know the real meaning of VM_RESERVED, I do not know which choice
is the best one for the official kernel tree, but locally I'll go for
adding VM_ALWAYSDUMP in ieee1394::dma_region_mmap.

Philippe
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mmap'ed memory in core files ?, Philippe De Muyter, (Tue Jul 1, 9:21 am)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Tue Jul 1, 2:16 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 7:01 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 6:50 am)
Re: mmap'ed memory in core files ?, Christoph Hellwig, (Wed Jul 2, 9:30 am)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Wed Jul 2, 6:58 am)
Re: mmap'ed memory in core files ?, Hidehiro Kawai, (Wed Jul 2, 11:51 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Thu Jul 3, 5:37 am)
[PATCH] ieee1394 : dump mmapped video1394 buffers in core fi..., Philippe De Muyter, (Thu Jul 3, 12:52 pm)
Re: [PATCH] ieee1394 : dump mmapped video1394 buffers in cor..., Philippe De Muyter, (Fri Jul 4, 4:49 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Thu Jul 3, 5:22 am)
Re: mmap'ed memory in core files ?, Hidehiro Kawai, (Fri Jul 4, 1:50 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Fri Jul 4, 7:13 am)
Re: mmap'ed memory in core files ?, Stefan Richter, (Fri Jul 4, 2:33 am)
Re: mmap'ed memory in core files ?, Hugh Dickins, (Fri Jul 4, 10:29 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Fri Jul 4, 7:25 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 7:04 am)
Re: mmap'ed memory in core files ?, Stefan Richter, (Wed Jul 2, 8:24 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 9:16 am)
Re: mmap'ed memory in core files ?, Bron Gondwana, (Tue Jul 1, 5:44 pm)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Wed Jul 2, 1:14 am)