public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] unexport sys_{open,read}
@ 2007-10-24 16:24 Adrian Bunk
  2007-10-24 17:19 ` Alan Cox
  2007-10-24 17:21 ` Arjan van de Ven
  0 siblings, 2 replies; 6+ messages in thread
From: Adrian Bunk @ 2007-10-24 16:24 UTC (permalink / raw)
  To: linux-kernel

sys_{open,read} can finally be unexported.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

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 
diff --git a/fs/open.c b/fs/open.c
index 23f334d..c0814de 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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)
diff --git a/fs/read_write.c b/fs/read_write.c
index 507ddff..d913d1e 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -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)
 {


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

* Re: [2.6 patch] unexport sys_{open,read}
  2007-10-24 16:24 Adrian Bunk
@ 2007-10-24 17:19 ` Alan Cox
  2007-10-24 17:21 ` Arjan van de Ven
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Cox @ 2007-10-24 17:19 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Wed, 24 Oct 2007 18:24:34 +0200
Adrian Bunk <bunk@kernel.org> wrote:

> sys_{open,read} can finally be unexported.
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>

Acked-by: Alan Cox <alan@redhat.com>

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

* Re: [2.6 patch] unexport sys_{open,read}
  2007-10-24 16:24 Adrian Bunk
  2007-10-24 17:19 ` Alan Cox
@ 2007-10-24 17:21 ` Arjan van de Ven
  2007-10-24 18:05   ` Alan Cox
  1 sibling, 1 reply; 6+ messages in thread
From: Arjan van de Ven @ 2007-10-24 17:21 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, alan, torvalds, viro

On Wed, 24 Oct 2007 18:24:34 +0200
Adrian Bunk <bunk@kernel.org> wrote:

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

how about giving it a proper changelog like this:


From: Adrian Bunk <bunk@kernel.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@kernel.org>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Alan Cox <alan@redhat.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)
 {

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

* Re: [2.6 patch] unexport sys_{open,read}
  2007-10-24 17:21 ` Arjan van de Ven
@ 2007-10-24 18:05   ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2007-10-24 18:05 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Adrian Bunk, linux-kernel, alan, torvalds, viro

> The patch below finally exports sys_open and sys_read now that they're

unexports 8)


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

* [2.6 patch] unexport sys_{open,read}
@ 2008-01-28 22:10 Adrian Bunk
  2008-01-29  0:29 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2008-01-28 22:10 UTC (permalink / raw)
  To: linux-kernel

Now that they are unused we can finally unexport sys_{open,read}.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 fs/open.c       |    1 -
 fs/read_write.c |    1 -
 2 files changed, 2 deletions(-)

eb86553917b5d7dc5c22e584145360ad0460372e 
diff --git a/fs/open.c b/fs/open.c
index 4932b4d..21acf85 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1061,7 +1061,6 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode)
 	prevent_tail_call(ret);
 	return ret;
 }
-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)
diff --git a/fs/read_write.c b/fs/read_write.c
index c4d3d17..af2c82f 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -366,7 +366,6 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
 
 	return ret;
 }
-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)
 {


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

* Re: [2.6 patch] unexport sys_{open,read}
  2008-01-28 22:10 [2.6 patch] unexport sys_{open,read} Adrian Bunk
@ 2008-01-29  0:29 ` Christoph Hellwig
  0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2008-01-29  0:29 UTC (permalink / raw)
  To: Adrian Bunk, torvalds; +Cc: linux-kernel

On Tue, Jan 29, 2008 at 12:10:40AM +0200, Adrian Bunk wrote:
> Now that they are unused we can finally unexport sys_{open,read}.
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>

Linus. any reason this is not in? 

> 
>  fs/open.c       |    1 -
>  fs/read_write.c |    1 -
>  2 files changed, 2 deletions(-)
> 
> eb86553917b5d7dc5c22e584145360ad0460372e 
> diff --git a/fs/open.c b/fs/open.c
> index 4932b4d..21acf85 100644
> --- a/fs/open.c
> +++ b/fs/open.c
> @@ -1061,7 +1061,6 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode)
>  	prevent_tail_call(ret);
>  	return ret;
>  }
> -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)
> diff --git a/fs/read_write.c b/fs/read_write.c
> index c4d3d17..af2c82f 100644
> --- a/fs/read_write.c
> +++ b/fs/read_write.c
> @@ -366,7 +366,6 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
>  
>  	return ret;
>  }
> -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)
>  {
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
---end quoted text---

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

end of thread, other threads:[~2008-01-29  0:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 22:10 [2.6 patch] unexport sys_{open,read} Adrian Bunk
2008-01-29  0:29 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2007-10-24 16:24 Adrian Bunk
2007-10-24 17:19 ` Alan Cox
2007-10-24 17:21 ` Arjan van de Ven
2007-10-24 18:05   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox