unexport sys_{open,read}
PATCH 1/1 unexport sys_{open,read}
sys_{open,read} can finally be unexported.
---
This patch has been sent on:
- 9 Sep 2007
- 27 Aug 2007
fs/open.c | 1 - fs/read_write.c | 1 - 2 files changed, 2 deletions(-)
6f6884f9ee675f2e804c6c58ca46337f9765dd0d
fs/open.c +0 -1
@@ -1057,7 +1057,6 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode)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)
fs/read_write.c +0 -1
@@ -370,7 +370,6 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)return ret; } -EXPORT_SYMBOL_GPL (sys_read); asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count) {
Quoted 3 lines · On Wed, 24 Oct 2007 18:24:34 +0200 Adrian Bunk <[email protected]> wrote:
sys_{open,read} can finally be unexported.
Signed-off-by Adrian Bunk <[email protected]>
Quoted 1 line · 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.
---
fs/open.c | 1 - fs/read_write.c | 1 - 2 files changed, 2 deletions(-)
fs/open.c +0 -1
@@ -1056,7 +1056,6 @@ asmlinkage long sys_open(const char __usprevent_tail_call (ret);return ret; } -EXPORT_SYMBOL_GPL (sys_open);asmlinkage long sys_openat (int dfd,const char __user *filename,int flags,int mode)
fs/read_write.c +0 -1
@@ -370,7 +370,6 @@ asmlinkage ssize_t sys_read(unsigned intreturn ret; } -EXPORT_SYMBOL_GPL (sys_read); asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count) {
Quoted 1 line
The patch below finally exports
sys_openandsys_readnow that they're
unexports 8)