Re: [RFC] shmgetfd idea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 30, 2014 at 9:46 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Mon, Jan 27, 2014 at 05:37:04PM -0800, John Stultz wrote:
>> In working with ashmem and looking briefly at kdbus' memfd ideas,
>> there's a commonality that both basically act as a method to provide
>> applications with unlinked tmpfs/shmem fds.
>
> Just use O_TMPFILE on a tmpfs file and you're done.

Ashmem and kdbus can name the deleted files, which is useful for
debugging and tools to show the associated name for the file
descriptor. They also show up in /proc/$PID/maps/ and possibly in
/proc/$PID/fd/.

O_TMPFILE always creates files with just the name "/". Unless that is
changed we wouldn't want switch over to O_TMPFILE, because we would
lose that nice feature.

Is there are way to "fix" O_TMPFILE to accept the name of the file to
be created, instead of insisting to take only the leading directory as
the argument?

Kay

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]