[lkml]   [2009]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] vfs: new O_NODE open flag
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 to disallow hardlinks.)

Plus, you can see hardlinks on ta-daa 'link count'.
(cesky, pictures)

 \ /
  Last update: 2009-12-10 08:41    [W:0.045 / U:21.540 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site