Re: [2.6 patch] unexport sys_{open,read}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Oct 2007 18:24:34 +0200
Adrian Bunk <[email protected]> wrote:

> sys_{open,read} can finally be unexported.

how about giving it a proper changelog like this:


From: Adrian Bunk <[email protected]>
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 <[email protected]>
Signed-off-by: Arjan van de Ven <[email protected]>
Acked-by: Alan Cox <[email protected]>

---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux