Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760652AbZLJHji (ORCPT ); Thu, 10 Dec 2009 02:39:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760567AbZLJHje (ORCPT ); Thu, 10 Dec 2009 02:39:34 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38232 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760556AbZLJHjd (ORCPT ); Thu, 10 Dec 2009 02:39:33 -0500 Date: Thu, 10 Dec 2009 08:39:02 +0100 From: Pavel Machek To: Miklos Szeredi Cc: Alan Cox , luto@mit.edu, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] vfs: new O_NODE open flag Message-ID: <20091210073901.GA1376@ucw.cz> References: <20091202204828.4fa0c108@lxorguk.ukuu.org.uk> <4B1A7159.3070101@mit.edu> <20091205202838.3456b6fc@lxorguk.ukuu.org.uk> <20091205231304.03a4af61@lxorguk.ukuu.org.uk> <20091207122346.6d18a8e1@lxorguk.ukuu.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1407 Lines: 32 On Mon 2009-12-07 13:41:09, Miklos Szeredi wrote: > On Mon, 7 Dec 2009, Alan Cox wrote: > > The standard udev unload is a true open barrier so has an implicit > > revoke() caused by the fact you cannot keep a handle to the filename open > > during the udev sequence (or the old driver would be pinned by a refcount > > and not unload). > > True, udev unload is an open barrier (modulo races), but O_NODE opens > simply don't matter in this respect, because they don't have anything > to do with the driver. > > ln /dev/foo /dev/shm/my_secret_device_link > (foo is removed) > open("/dev/shm/my_secret_device_link", O_RDWR) > > How is this different than keeping the device open with O_NODE? First version needs writable directory on same fs as /dev, which may not be there in all configs. (Plus note various 'security enhanced' linuxes that do not allow hardlinks on files you don't own. Maybe someone uses subterfugue.sf.net to disallow hardlinks.) Plus, you can see hardlinks on ta-daa 'link count'. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- 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/