public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>, "H.Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <andi@firstfloor.org>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	LKLM <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] [x86, next] Fix unsuitable attributes of mce debugfs.
Date: Fri, 29 Oct 2010 13:41:51 +0900	[thread overview]
Message-ID: <4CCA508F.3090903@np.css.fujitsu.com> (raw)

The debug interfaces of mce should be desired to do following operations
    - Write operation as root user
    - Read operation as all users
for debugging mce functionality.

But the real attributes of interfaces of mce are 0444.
Though the attributes of interfaces do not give any impact to
debug mce functionality, I still think that the attributes of
interfaces should be changed from 0444 to 0644.

I tested this patch on Intel64 next-tree.

Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
---
 arch/x86/kernel/cpu/mcheck/mce-severity.c |    2 +-
 arch/x86/kernel/cpu/mcheck/mce.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index 1e8d66c..f9e6376 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -203,7 +203,7 @@ static int __init severities_debugfs_init(void)
 	if (dmce == NULL)
 		goto err_out;
 	fseverities_coverage = debugfs_create_file("severities-coverage",
-						   0444, dmce, NULL,
+						   0644, dmce, NULL,
 						   &severities_coverage_fops);
 	if (fseverities_coverage == NULL)
 		goto err_out;
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 7a35b72..8edb04d 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2200,7 +2200,7 @@ static int __init mcheck_debugfs_init(void)
 	dmce = mce_get_debugfs_dir();
 	if (!dmce)
 		return -ENOMEM;
-	ffake_panic = debugfs_create_file("fake_panic", 0444, dmce, NULL,
+	ffake_panic = debugfs_create_file("fake_panic", 0644, dmce, NULL,
 					  &fake_panic_fops);
 	if (!ffake_panic)
 		return -ENOMEM;
-- 
1.7.2.2


                 reply	other threads:[~2010-10-29  4:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4CCA508F.3090903@np.css.fujitsu.com \
    --to=jin.dongming@np.css.fujitsu.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=ying.huang@intel.com \
    /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