lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <486DC42A.2080105@s5r6.in-berlin.de>
Date:	Fri, 04 Jul 2008 08:33:14 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>
CC:	Philippe De Muyter <phdm@...qel.be>,
	Michael Kerrisk <mtk.manpages@...glemail.com>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	linux-kernel@...r.kernel.org,
	libdc1394-devel@...ts.sourceforge.net,
	sugita <yumiko.sugita.yf@...achi.com>,
	Satoshi OSHIMA <satoshi.oshima.fk@...achi.com>
Subject: Re: mmap'ed memory in core files ?

Hidehiro Kawai wrote:
> Philippe De Muyter wrote:
>> 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,

I don't know these things either.  But among else, VM_RESERVED prevents 
a vma from being swapped out.  Makes kind of sense, given that besides 
the CPUs also the FireWire controller writes to this memory.

>> but locally I'll go for
>> adding VM_ALWAYSDUMP in ieee1394::dma_region_mmap.
> 
> I'm afraid I don't know real usages of VM_RESERVED and VM_IO, either.
> Allowing everyone to choose whether dump the dma region or not,
> perhaps we need to introduce a new VM flag (e.g. VM_DUMPABLE) and
> a coredump_filter bit which controls (VM_IO | VM_RESERVED) &&
> VM_DUMPABLE area, for example.
> 
> I think it is also OK to just add VM_ALWAYSDUMP flag to the dma
> region if the device driver knows the region is safely readable
> and small enough.

It is safely readable.  I don't know if it is small enough.  The size of 
the DMA buffer is AFAIK chosen by userspace (by the application program 
or maybe a library) which uses the character device file ABIs for 
isochronous FireWire IO of raw1394, video1394, or dv1394.
-- 
Stefan Richter
-=====-==--- -=== --=--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ