From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 4/7] fuse: add POSIX file locking support Date: Sun, 18 Jun 2006 23:58:05 -0700 Message-ID: <20060618235805.f12d4606.akpm@osdl.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from smtp.osdl.org ([65.172.181.4]:26587 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1751211AbWFSG6J (ORCPT ); Mon, 19 Jun 2006 02:58:09 -0400 To: Miklos Szeredi In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 12 Jun 2006 14:29:20 +0200 Miklos Szeredi wrote: > +/* > + * It would be nice to scramble the ID space, so that the value of the > + * files_struct pointer is not exposed to userspace. Symmetric crypto > + * functions are overkill, since the inverse function doesn't need to > + * be implemented (though it does have to exist). Is there something > + * simpler? > + */ > +static inline u64 fuse_lock_owner_id(fl_owner_t id) > +{ > + return (unsigned long) id; > +} Add a constant, not-known-to-userspace offset to all ids?