mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH] x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only
Date: Mon, 30 Nov 2015 13:12:59 +0100	[thread overview]
Message-ID: <1448885579-32506-1-git-send-email-bp@alien8.de> (raw)

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


             reply	other threads:[~2015-11-30 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 12:12 Borislav Petkov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448885579-32506-1-git-send-email-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®