lkml.org 
[lkml]   [2013]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: RFC: named anonymous vmas
From
On Sat, Jun 22, 2013 at 3:31 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Fri, Jun 21, 2013 at 04:42:41PM -0700, Colin Cross wrote:
>> ranges, which John Stultz has been implementing. The second is
>> anonymous shareable memory without having a world-writable tmpfs that
>> untrusted apps could fill with files.
>
> I still haven't seen any explanation of what ashmem buys over a shared
> mmap of /dev/zero in that respect, btw.

I believe the difference is that ashmem ties the memory to an fd, so
it can be passed to another process and mmaped to get to the same
memory, but /dev/zero does not. Passing a /dev/zero fd and mmaping it
would result in a brand new region of zeroed memory. Opening a tmpfs
file would allow sharing memory by passing the fd, but we don't want a
world-writable tmpfs.


\
 
 \ /
  Last update: 2013-06-22 19:41    [W:0.147 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site