You can write lookup so that it always succeeds and returns dummy inode
without sending anything and do all the work in open & inode operations.
> > > Could anyone see a solution other than adding a flags to open mode (say
> > > O_EXEC and O_EXEC_LIB), that would be added to the dentry_open in open_exec
> > > and sys_uselib? I don't like the idea of pathing vfs for this.
> >
> > Send always 'open for read' and ignore 'open for execute'.
>
> Won't work for many reasons. Correct error code is one (could be removed by
> pre-checking permission),
> exclusivity of write versus execute is the other
> (can't be workaround).
MAP_DENYWRITE is used for this. If somebody is mapping file with
MAP_DENYWRITE, lock it on server. Write locking does not depend on exec,
and it is bad to expect that it may be used only in exec.
Mikulas
-
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/