Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752240Ab3FXXpO (ORCPT ); Mon, 24 Jun 2013 19:45:14 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:42216 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750860Ab3FXXpM (ORCPT ); Mon, 24 Jun 2013 19:45:12 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130622103158.GA16304@infradead.org> <20130624114832.GA9961@infradead.org> Date: Mon, 24 Jun 2013 16:45:12 -0700 X-Google-Sender-Auth: I7BDcyJAcULIgkVsIg4xz-C2aNw Message-ID: Subject: Re: RFC: named anonymous vmas From: John Stultz To: Colin Cross Cc: Christoph Hellwig , Alex Elsayed , Linux-MM , lkml Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1535 Lines: 30 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 directories with restrictive permissions on >>> startup/app install? Then each app creates files in its own directory, and >>> can pass the fds around. > > If each app gets its own writable directory that's not really > different than a world writable tmpfs. It requires something that > watches for apps to exit for any reason and cleans up their > directories, and it requires each app to come up with an unused name > when it wants to create a file, and the kernel can give you both very > cleanly. Though, I believe having a daemon that has exclusive access to tmpfs, and creates, unlinks and passes the fd to the requesting application would provide a userspace only implementation of the second feature requirement ("without having a world-writable tmpfs that untrusted apps could fill with files"). Though I'm not sure what the proc//maps naming would look like on the unlinked file, so it might not solve the third naming issue. thanks -john -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/