Re: RFC: named anonymous vmas

2013-08-03 Thread KOSAKI Motohiro
On Thu, Aug 1, 2013 at 4:36 AM, Rich Felker wrote: > On Thu, Aug 01, 2013 at 01:29:51AM -0700, Christoph Hellwig wrote: >> Btw, FreeBSD has an extension to shm_open to create unnamed but fd >> passable segments. From their man page: >> >> As a FreeBSD extension, the constant SHM_ANON may be u

Re: RFC: named anonymous vmas

2013-08-02 Thread Christoph Hellwig
On Thu, Aug 01, 2013 at 04:36:08AM -0400, Rich Felker wrote: > I'm not sure what the purpose is. shm_open with a long random filename > and O_EXCL|O_CREAT, followed immediately by shm_unlink, is just as > good except in the case where you have a malicious user killing the > process in between these

Re: RFC: named anonymous vmas

2013-08-01 Thread Rich Felker
On Thu, Aug 01, 2013 at 01:29:51AM -0700, Christoph Hellwig wrote: > Btw, FreeBSD has an extension to shm_open to create unnamed but fd > passable segments. From their man page: > > As a FreeBSD extension, the constant SHM_ANON may be used for the path > argument to shm_open(). In this c

Re: RFC: named anonymous vmas

2013-08-01 Thread Christoph Hellwig
Btw, FreeBSD has an extension to shm_open to create unnamed but fd passable segments. From their man page: As a FreeBSD extension, the constant SHM_ANON may be used for the path argument to shm_open(). In this case, an anonymous, unnamed shared memory object is created. Since the ob

Re: RFC: named anonymous vmas

2013-07-13 Thread Sam Ben
Hi Christoph, On 06/24/2013 07:48 PM, Christoph Hellwig wrote: On Sat, Jun 22, 2013 at 12:47:29PM -0700, Alex Elsayed wrote: Couldn't this be done by having a root-only tmpfs, and having a userspace component that creates per-app directories with restrictive permissions on startup/app install? T

Re: RFC: named anonymous vmas

2013-07-13 Thread Sam Ben
Hi Colin, On 06/22/2013 07:42 AM, Colin Cross wrote: One of the features of ashmem (drivers/staging/android/ashmem.c) that hasn't gotten much discussion about moving out of staging is named anonymous memory. In Android, ashmem is used for three different features, and most users of it only care

Re: RFC: named anonymous vmas

2013-06-24 Thread John Stultz
On Mon, Jun 24, 2013 at 10:26 AM, Colin Cross wrote: > On Mon, Jun 24, 2013 at 4:48 AM, Christoph Hellwig wrote: >> On Sat, Jun 22, 2013 at 12:47:29PM -0700, Alex Elsayed wrote: >>> Couldn't this be done by having a root-only tmpfs, and having a userspace >>> component that creates per-app direct

Re: RFC: named anonymous vmas

2013-06-24 Thread Colin Cross
On Mon, Jun 24, 2013 at 4:48 AM, Christoph Hellwig wrote: > On Sat, Jun 22, 2013 at 12:47:29PM -0700, Alex Elsayed wrote: >> Couldn't this be done by having a root-only tmpfs, and having a userspace >> component that creates per-app directories with restrictive permissions on >> startup/app instal

Re: RFC: named anonymous vmas

2013-06-24 Thread Christoph Hellwig
On Sat, Jun 22, 2013 at 12:47:29PM -0700, Alex Elsayed wrote: > Couldn't this be done by having a root-only tmpfs, and having a userspace > component that creates per-app directories with restrictive permissions on > startup/app install? Then each app creates files in its own directory, and > ca

Re: RFC: named anonymous vmas

2013-06-22 Thread Colin Cross
On Sat, Jun 22, 2013 at 3:31 AM, Christoph Hellwig 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 fil

Re: RFC: named anonymous vmas

2013-06-22 Thread Christoph Hellwig
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 ov

Re: RFC: named anonymous vmas

2013-06-21 Thread Colin Cross
On Fri, Jun 21, 2013 at 10:12 PM, Kyungmin Park wrote: > On Sat, Jun 22, 2013 at 8:42 AM, Colin Cross wrote: >> One of the features of ashmem (drivers/staging/android/ashmem.c) that >> hasn't gotten much discussion about moving out of staging is named >> anonymous memory. >> >> In Android, ashmem

Re: RFC: named anonymous vmas

2013-06-21 Thread Kyungmin Park
On Sat, Jun 22, 2013 at 8:42 AM, Colin Cross wrote: > One of the features of ashmem (drivers/staging/android/ashmem.c) that > hasn't gotten much discussion about moving out of staging is named > anonymous memory. > > In Android, ashmem is used for three different features, and most > users of it o

RFC: named anonymous vmas

2013-06-21 Thread Colin Cross
One of the features of ashmem (drivers/staging/android/ashmem.c) that hasn't gotten much discussion about moving out of staging is named anonymous memory. In Android, ashmem is used for three different features, and most users of it only care about one feature at a time. One is volatile ranges, w