Skip to content

Commit

Permalink
mark sys_open/sys_read exports unused
Browse files Browse the repository at this point in the history
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 c2b1239 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,
filp_open()/vfs_read are the better APIs to use, without this security
issue.

The patch below marks sys_open and sys_read unused now that they're
really not used anymore, and for deletion in the 2.6.25 timeframe.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Nov 15, 2007
1 parent 22800a2 commit cb51f97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode)
prevent_tail_call(ret);
return ret;
}
EXPORT_SYMBOL_GPL(sys_open);
EXPORT_UNUSED_SYMBOL_GPL(sys_open); /* To be deleted for 2.6.25 */

asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
int mode)
Expand Down
2 changes: 1 addition & 1 deletion fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)

return ret;
}
EXPORT_SYMBOL_GPL(sys_read);
EXPORT_UNUSED_SYMBOL_GPL(sys_read); /* to be deleted for 2.6.25 */

asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
{
Expand Down

0 comments on commit cb51f97

Please sign in to comment.