Re: mmap'ed memory in core files ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Philippe De Muyter
Date: Thursday, July 3, 2008 - 2: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, 6:21 am)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Tue Jul 1, 11:16 am)
Re: mmap'ed memory in core files ?, Bron Gondwana, (Tue Jul 1, 2:44 pm)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Tue Jul 1, 10:14 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 3:50 am)
Re: mmap'ed memory in core files ?, Michael Kerrisk, (Wed Jul 2, 3:58 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 4:01 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 4:04 am)
Re: mmap'ed memory in core files ?, Stefan Richter, (Wed Jul 2, 5:24 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Wed Jul 2, 6:16 am)
Re: mmap'ed memory in core files ?, Christoph Hellwig, (Wed Jul 2, 6:30 am)
Re: mmap'ed memory in core files ?, Hidehiro Kawai, (Wed Jul 2, 8:51 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Thu Jul 3, 2:22 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Thu Jul 3, 2:37 am)
[PATCH] ieee1394 : dump mmapped video1394 buffers in core ..., Philippe De Muyter, (Thu Jul 3, 9:52 am)
Re: mmap'ed memory in core files ?, Hidehiro Kawai, (Thu Jul 3, 10:50 pm)
Re: mmap'ed memory in core files ?, Stefan Richter, (Thu Jul 3, 11:33 pm)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Fri Jul 4, 4:13 am)
Re: mmap'ed memory in core files ?, Philippe De Muyter, (Fri Jul 4, 4:25 am)
Re: mmap'ed memory in core files ?, Hugh Dickins, (Fri Jul 4, 7:29 am)
Re: [PATCH] ieee1394 : dump mmapped video1394 buffers in c ..., Philippe De Muyter, (Fri Jul 4, 1:49 pm)