[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071024102151.54bb1749@laptopd505.fenrus.org>
Date: Wed, 24 Oct 2007 10:21:51 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Adrian Bunk <bunk@...nel.org>
Cc: linux-kernel@...r.kernel.org, alan@...hat.com,
torvalds@...ux-foundation.org, viro@....linux.org.uk
Subject: Re: [2.6 patch] unexport sys_{open,read}
On Wed, 24 Oct 2007 18:24:34 +0200
Adrian Bunk <bunk@...nel.org> wrote:
> sys_{open,read} can finally be unexported.
how about giving it a proper changelog like this:
From: Adrian Bunk <bunk@...nel.org>
Subject: unexport sys_open and sys_read
sys_open / sys_read were used in the early 1.2 days to load firmware from
disk inside drivers. Since 2.0 or so this was deprecated behavior, but
several drivers still were using this. Since a few years we have a
request_firmware() API that implements this in a nice, consistent way. Only
some old ISA sound drivers (pre-ALSA) still straggled along for some
time.... however with commit c2b1239a9f22f19c53543b460b24507d0e21ea0c the
last user is now gone.
This is a good thing, since using sys_open / sys_read etc for firmware is a
very buggy to dangerous thing to do; these operations put an fd in the
process file descriptor table.... which then can be tampered with from other
threads for example. For those who don't want the firmware loader,
open_filp()/vfs_read are the better APIs to use, without this security
issue.
The patch below finally exports sys_open and sys_read now that they're
really not used anymore.
Signed-off-by: Adrian Bunk <bunk@...nel.org>
Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
Acked-by: Alan Cox <alan@...hat.com>
---
fs/open.c | 1 -
fs/read_write.c | 1 -
2 files changed, 2 deletions(-)
Index: linux-2.6.23-git8/fs/open.c
===================================================================
--- linux-2.6.23-git8.orig/fs/open.c
+++ linux-2.6.23-git8/fs/open.c
@@ -1056,7 +1056,6 @@ asmlinkage long sys_open(const char __us
prevent_tail_call(ret);
return ret;
}
-EXPORT_SYMBOL_GPL(sys_open);
asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
int mode)
Index: linux-2.6.23-git8/fs/read_write.c
===================================================================
--- linux-2.6.23-git8.orig/fs/read_write.c
+++ linux-2.6.23-git8/fs/read_write.c
@@ -370,7 +370,6 @@ asmlinkage ssize_t sys_read(unsigned int
return ret;
}
-EXPORT_SYMBOL_GPL(sys_read);
asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists