* [PATCH] epoll: don't printk pointer value
@ 2002-12-11 6:27 Robert Love
2002-12-11 6:30 ` William Lee Irwin III
2002-12-11 17:16 ` Davide Libenzi
0 siblings, 2 replies; 7+ messages in thread
From: Robert Love @ 2002-12-11 6:27 UTC (permalink / raw)
To: davidel; +Cc: linux-kernel
Davide,
I really cannot think of a good reason why eventpoll_init() should print
a pointer value to user-space - especially the value of current?
I do not think this is good practice and someone might even consider it
a security hole. Personally, I would prefer to remove the "successfully
initialized" message altogether, but at the very least can we not print
current's address?
Robert Love
fs/eventpoll.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -urN linux-2.5.51/fs/eventpoll.c linux/fs/eventpoll.c
--- linux-2.5.51/fs/eventpoll.c 2002-12-09 21:45:54.000000000 -0500
+++ linux/fs/eventpoll.c 2002-12-11 01:23:07.000000000 -0500
@@ -1573,7 +1573,7 @@
if (IS_ERR(eventpoll_mnt))
goto eexit_4;
- printk(KERN_INFO "[%p] eventpoll: successfully initialized.\n", current);
+ printk(KERN_INFO "eventpoll: successfully initialized.\n", current);
return 0;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] epoll: don't printk pointer value
2002-12-11 6:27 [PATCH] epoll: don't printk pointer value Robert Love
@ 2002-12-11 6:30 ` William Lee Irwin III
2002-12-11 6:33 ` Robert Love
2002-12-11 17:16 ` Davide Libenzi
1 sibling, 1 reply; 7+ messages in thread
From: William Lee Irwin III @ 2002-12-11 6:30 UTC (permalink / raw)
To: Robert Love; +Cc: davidel, linux-kernel
On Wed, Dec 11, 2002 at 01:27:25AM -0500, Robert Love wrote:
> I really cannot think of a good reason why eventpoll_init() should print
> a pointer value to user-space - especially the value of current?
> I do not think this is good practice and someone might even consider it
> a security hole. Personally, I would prefer to remove the "successfully
> initialized" message altogether, but at the very least can we not print
> current's address?
You're still passing current as an argument to the printk.
Bill
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] epoll: don't printk pointer value
2002-12-11 6:30 ` William Lee Irwin III
@ 2002-12-11 6:33 ` Robert Love
2002-12-11 6:41 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Robert Love @ 2002-12-11 6:33 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: davidel, linux-kernel
On Wed, 2002-12-11 at 01:30, William Lee Irwin III wrote:
> You're still passing current as an argument to the printk.
Ah crap. That is what I get for not testing it... nothing is too
trivial, boys and girls.
Thanks, Bill.
Robert Love
fs/eventpoll.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -urN linux-2.5.51/fs/eventpoll.c linux/fs/eventpoll.c
--- linux-2.5.51/fs/eventpoll.c 2002-12-09 21:45:54.000000000 -0500
+++ linux/fs/eventpoll.c 2002-12-11 01:23:07.000000000 -0500
@@ -1573,7 +1573,7 @@
if (IS_ERR(eventpoll_mnt))
goto eexit_4;
- printk(KERN_INFO "[%p] eventpoll: successfully initialized.\n", current);
+ printk(KERN_INFO "eventpoll: successfully initialized.\n");
return 0;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] epoll: don't printk pointer value
2002-12-11 6:33 ` Robert Love
@ 2002-12-11 6:41 ` Andrew Morton
2002-12-11 6:45 ` Robert Love
2002-12-11 7:53 ` William Lee Irwin III
0 siblings, 2 replies; 7+ messages in thread
From: Andrew Morton @ 2002-12-11 6:41 UTC (permalink / raw)
To: Robert Love; +Cc: William Lee Irwin III, davidel, linux-kernel
Robert Love wrote:
>
> ...
> --- linux-2.5.51/fs/eventpoll.c 2002-12-09 21:45:54.000000000 -0500
> +++ linux/fs/eventpoll.c 2002-12-11 01:23:07.000000000 -0500
> @@ -1573,7 +1573,7 @@
> if (IS_ERR(eventpoll_mnt))
> goto eexit_4;
>
> - printk(KERN_INFO "[%p] eventpoll: successfully initialized.\n", current);
> + printk(KERN_INFO "eventpoll: successfully initialized.\n");
>
Guys, it's noise. Just nuke it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] epoll: don't printk pointer value
2002-12-11 6:41 ` Andrew Morton
@ 2002-12-11 6:45 ` Robert Love
2002-12-11 7:53 ` William Lee Irwin III
1 sibling, 0 replies; 7+ messages in thread
From: Robert Love @ 2002-12-11 6:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: William Lee Irwin III, davidel, linux-kernel
On Wed, 2002-12-11 at 01:41, Andrew Morton wrote:
> Guys, it's noise. Just nuke it.
So I would prefer...
Robert Love
fs/eventpoll.c | 2 --
1 files changed, 2 deletions(-)
diff -urN linux-2.5.51/fs/eventpoll.c linux/fs/eventpoll.c
--- linux-2.5.51/fs/eventpoll.c 2002-12-09 21:45:54.000000000 -0500
+++ linux/fs/eventpoll.c 2002-12-11 01:43:59.000000000 -0500
@@ -1573,8 +1573,6 @@
if (IS_ERR(eventpoll_mnt))
goto eexit_4;
- printk(KERN_INFO "[%p] eventpoll: successfully initialized.\n", current);
-
return 0;
eexit_4:
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] epoll: don't printk pointer value
2002-12-11 6:41 ` Andrew Morton
2002-12-11 6:45 ` Robert Love
@ 2002-12-11 7:53 ` William Lee Irwin III
1 sibling, 0 replies; 7+ messages in thread
From: William Lee Irwin III @ 2002-12-11 7:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: Robert Love, davidel, linux-kernel
Robert Love wrote:
>> ...
On Tue, Dec 10, 2002 at 10:41:30PM -0800, Andrew Morton wrote:
> Guys, it's noise. Just nuke it.
Fine by me. I just notice the format string business.
Bill
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] epoll: don't printk pointer value
2002-12-11 6:27 [PATCH] epoll: don't printk pointer value Robert Love
2002-12-11 6:30 ` William Lee Irwin III
@ 2002-12-11 17:16 ` Davide Libenzi
1 sibling, 0 replies; 7+ messages in thread
From: Davide Libenzi @ 2002-12-11 17:16 UTC (permalink / raw)
To: Robert Love; +Cc: Linux Kernel Mailing List
On Tue, 11 Dec 2002, Robert Love wrote:
> Davide,
>
> I really cannot think of a good reason why eventpoll_init() should print
> a pointer value to user-space - especially the value of current?
>
> I do not think this is good practice and someone might even consider it
> a security hole. Personally, I would prefer to remove the "successfully
> initialized" message altogether, but at the very least can we not print
> current's address?
It's ok Robert, it was used for debugging purposes and now it can be
completely removed ( the whole printk() ). I'll post a patch to Linus that
removes the printk() ...
- Davide
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-12-11 17:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-11 6:27 [PATCH] epoll: don't printk pointer value Robert Love
2002-12-11 6:30 ` William Lee Irwin III
2002-12-11 6:33 ` Robert Love
2002-12-11 6:41 ` Andrew Morton
2002-12-11 6:45 ` Robert Love
2002-12-11 7:53 ` William Lee Irwin III
2002-12-11 17:16 ` Davide Libenzi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox