All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
@ 2009-08-17  9:43 ` Amerigo Wang
  0 siblings, 0 replies; 30+ messages in thread
From: Amerigo Wang @ 2009-08-17  9:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Pekka Enberg, Vegard Nossum, Eduard - Gabriel Munteanu,
	Thomas Gleixner, Ingo Molnar, linux-mm, Christoph Lameter,
	David Rientjes, Amerigo Wang, Matt Mackall, Arjan van de Ven


/proc/timer_list and /proc/slabinfo are not supposed to be written,
so there should be no write permissions on it.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: David Rientjes <rientjes@google.com>

---
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index a999b92..fddd69d 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -286,7 +286,7 @@ static int __init init_timer_list_procfs(void)
 {
 	struct proc_dir_entry *pe;
 
-	pe = proc_create("timer_list", 0644, NULL, &timer_list_fops);
+	pe = proc_create("timer_list", 0444, NULL, &timer_list_fops);
 	if (!pe)
 		return -ENOMEM;
 	return 0;
diff --git a/mm/slab.c b/mm/slab.c
index 7b5d4de..a19e4be 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4473,7 +4473,7 @@ static const struct file_operations proc_slabstats_operations = {
 
 static int __init slab_proc_init(void)
 {
-	proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
+	proc_create("slabinfo",S_IRUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
 #ifdef CONFIG_DEBUG_SLAB_LEAK
 	proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations);
 #endif
diff --git a/mm/slub.c b/mm/slub.c
index b9f1491..aba2c1b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4726,7 +4726,7 @@ static const struct file_operations proc_slabinfo_operations = {
 
 static int __init slab_proc_init(void)
 {
-	proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
+	proc_create("slabinfo",S_IRUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
 	return 0;
 }
 module_init(slab_proc_init);

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

end of thread, other threads:[~2009-08-20 10:33 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17  9:43 [Patch] proc: drop write permission on 'timer_list' and 'slabinfo' Amerigo Wang
2009-08-17  9:43 ` Amerigo Wang
2009-08-17  9:48 ` Ingo Molnar
2009-08-17  9:48   ` Ingo Molnar
2009-08-17  9:54   ` Pekka Enberg
2009-08-17  9:54     ` Pekka Enberg
2009-08-17 16:29     ` Christoph Lameter
2009-08-17 16:29       ` Christoph Lameter
2009-08-17 16:35       ` Pekka Enberg
2009-08-17 16:35         ` Pekka Enberg
2009-08-17 16:41         ` Christoph Lameter
2009-08-17 16:41           ` Christoph Lameter
2009-08-18  1:59           ` Amerigo Wang
2009-08-18  1:59             ` Li Zefan
2009-08-18  1:59               ` Li Zefan
2009-08-18  3:08               ` Amerigo Wang
2009-08-18 12:00                 ` Wu Fengguang
2009-08-18 12:00                   ` Wu Fengguang
2009-08-19  2:36                   ` Amerigo Wang
2009-08-19  2:36                     ` Amerigo Wang
2009-08-19  2:37                     ` Wu Fengguang
2009-08-19  2:37                       ` Wu Fengguang
2009-08-19 10:39                       ` Amerigo Wang
2009-08-19 18:47                         ` Pekka Enberg
2009-08-19 18:47                           ` Pekka Enberg
2009-08-20 10:34                           ` Amerigo Wang
2009-08-20 10:34                             ` Amerigo Wang
2009-08-18 16:12               ` Pekka Enberg
2009-08-18 16:12                 ` Pekka Enberg
2009-08-17  9:51 ` [tip:timers/urgent] timers: Drop write permission on /proc/timer_list tip-bot for Amerigo Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.