Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755400Ab3HZPrz (ORCPT ); Mon, 26 Aug 2013 11:47:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19566 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391Ab3HZPry (ORCPT ); Mon, 26 Aug 2013 11:47:54 -0400 Date: Mon, 26 Aug 2013 11:47:35 -0400 From: Naoya Horiguchi To: Wanpeng Li Cc: Andrew Morton , Andi Kleen , Fengguang Wu , Tony Luck , gong.chen@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <1377532055-dwlp8gs5-mutt-n-horiguchi@ah.jp.nec.com> In-Reply-To: <20130826090837.GA6543@hacker.(null)> References: <1377506774-5377-1-git-send-email-liwanp@linux.vnet.ibm.com> <1377506774-5377-9-git-send-email-liwanp@linux.vnet.ibm.com> <20130826090837.GA6543@hacker.(null)> Subject: Re: [PATCH v4 9/10] mm/hwpoison: change permission of corrupt-pfn/unpoison-pfn to 0400 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mutt-References: <20130826090837.GA6543@hacker.(null)> X-Mutt-Fcc: ~/Maildir/sent/ User-Agent: Mutt 1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1804 Lines: 47 On Mon, Aug 26, 2013 at 05:08:38PM +0800, Wanpeng Li wrote: > On Mon, Aug 26, 2013 at 04:46:13PM +0800, Wanpeng Li wrote: > >Hwpoison inject doesn't implement read method for corrupt-pfn/unpoison-pfn > >attributes: > > > ># cat /sys/kernel/debug/hwpoison/corrupt-pfn > >cat: /sys/kernel/debug/hwpoison/corrupt-pfn: Permission denied > ># cat /sys/kernel/debug/hwpoison/unpoison-pfn > >cat: /sys/kernel/debug/hwpoison/unpoison-pfn: Permission denied > > > >This patch change the permission of corrupt-pfn/unpoison-pfn to 0400. > > > >Signed-off-by: Wanpeng Li > >--- > > mm/hwpoison-inject.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > >diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c > >index 3a61efc..8b77bfd 100644 > >--- a/mm/hwpoison-inject.c > >+++ b/mm/hwpoison-inject.c > >@@ -88,12 +88,12 @@ static int pfn_inject_init(void) > > * hardware status change, hence do not require hardware support. > > * They are mainly for testing hwpoison in software level. > > */ > >- dentry = debugfs_create_file("corrupt-pfn", 0600, hwpoison_dir, > >+ dentry = debugfs_create_file("corrupt-pfn", 0400, hwpoison_dir, > > NULL, &hwpoison_fops); > > if (!dentry) > > goto fail; > > > >- dentry = debugfs_create_file("unpoison-pfn", 0600, hwpoison_dir, > >+ dentry = debugfs_create_file("unpoison-pfn", 0400, hwpoison_dir, > > NULL, &unpoison_fops); > > if (!dentry) > > goto fail; > >-- > >1.8.1.2 > > Fix this patch: Reviewed-by: Naoya Horiguchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/