mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only
@ 2015-11-30 12:12 Borislav Petkov
  2015-12-04 12:03 ` [tip:x86/mm] x86/mm/ptdump: Make (debugfs)/ kernel_page_tables read-only tip-bot for Borislav Petkov
  2015-12-04 13:57 ` [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only Kees Cook
  0 siblings, 2 replies; 4+ messages in thread
From: Borislav Petkov @ 2015-11-30 12:12 UTC (permalink / raw)
  To: X86 ML; +Cc: LKML, Arjan van de Ven

From: Borislav Petkov <bp@suse.de>

File should be created with S_IRUSR and not with S_IWUSR too because
writing to it doesn't make any sense. I mean, we don't have a ->write
method anyway but let's have the permissions correct too.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
---
 arch/x86/mm/debug_pagetables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/debug_pagetables.c b/arch/x86/mm/debug_pagetables.c
index b35ee86a9316..bfcffdf6c577 100644
--- a/arch/x86/mm/debug_pagetables.c
+++ b/arch/x86/mm/debug_pagetables.c
@@ -26,7 +26,7 @@ static struct dentry *pe;
 
 static int __init pt_dump_debug_init(void)
 {
-	pe = debugfs_create_file("kernel_page_tables", 0600, NULL, NULL,
+	pe = debugfs_create_file("kernel_page_tables", S_IRUSR, NULL, NULL,
 				 &ptdump_fops);
 	if (!pe)
 		return -ENOMEM;
-- 
2.3.5


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

end of thread, other threads:[~2015-12-04 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 12:12 [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only Borislav Petkov
2015-12-04 12:03 ` [tip:x86/mm] x86/mm/ptdump: Make (debugfs)/ kernel_page_tables read-only tip-bot for Borislav Petkov
2015-12-04 13:57 ` [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only Kees Cook
2015-12-04 14:15   ` Borislav Petkov

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

all inboxes | Powered by JetHome®