linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FMODE_EXEC or alike?
@ 2006-02-20 22:19 Oleg Drokin
  2006-02-21  5:51 ` Andrew Morton
  2006-02-21 10:39 ` Christoph Hellwig
  0 siblings, 2 replies; 22+ messages in thread
From: Oleg Drokin @ 2006-02-20 22:19 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel

Hello!

   We are working on a lustre client that would not require any patches
   to linux kernel. And there are few things that would be nice to have
   that I'd like your input on.

   One of those is FMODE_EXEC - to correctly detect cross-node situations with
   executing a file that is opened for write or the other way around, we need
   something like this extra file mode to be present (and used as a file open
   mode when opening files for exection, e.g. in fs/exec.c)
   Do you think there is a chance this can be included into vanilla kernel,
   or is there a better solution I oversee?
   I am just thinking about something as simple as this
   (with some suitable FMODE_EXEC define, of course):

--- linux/fs/exec.c.orig	2006-02-21 00:11:47.000000000 +0200
+++ linux/fs/exec.c	2006-02-21 00:12:24.000000000 +0200
@@ -127,7 +127,7 @@ asmlinkage long sys_uselib(const char __
 	struct nameidata nd;
 	int error;
 
-	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
+	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
 	if (error)
 		goto out;
 
@@ -477,7 +477,7 @@ struct file *open_exec(const char *name)
 	int err;
 	struct file *file;
 
-	err = path_lookup_open(name, LOOKUP_FOLLOW, &nd, FMODE_READ);
+	err = path_lookup_open(name, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
 	file = ERR_PTR(err);
 
 	if (!err) {

   Thanks.

Bye,
    Oleg

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2006-02-22 23:32 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-20 22:19 FMODE_EXEC or alike? Oleg Drokin
2006-02-21  5:51 ` Andrew Morton
2006-02-21 11:30   ` Oleg Drokin
2006-02-21 11:36     ` Andrew Morton
2006-02-21 11:56       ` Oleg Drokin
2006-02-21 13:59   ` Trond Myklebust
2006-02-21 14:15     ` Antonio Vargas
2006-02-21 14:21       ` Oleg Drokin
2006-02-22  9:57         ` Antonio Vargas
2006-02-21 14:42       ` Trond Myklebust
2006-02-21 23:26     ` J. Bruce Fields
2006-02-21 23:32       ` Trond Myklebust
2006-02-22 19:57         ` J. Bruce Fields
2006-02-22 21:36           ` Trond Myklebust
2006-02-22 22:04             ` J. Bruce Fields
2006-02-22 22:17               ` Trond Myklebust
2006-02-22 23:31                 ` J. Bruce Fields
2006-02-21 10:39 ` Christoph Hellwig
2006-02-22  1:03   ` Chris Wedgwood
2006-02-22  8:59     ` Steven Whitehouse
2006-02-22 21:42       ` J. Bruce Fields
2006-02-22 22:02         ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).