From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanpeng Li Subject: Re: [PATCH v4 9/10] mm/hwpoison: change permission of corrupt-pfn/unpoison-pfn to 0400 Date: Mon, 26 Aug 2013 17:08:38 +0800 Message-ID: <26481.5340204679$1377508138@news.gmane.org> References: <1377506774-5377-1-git-send-email-liwanp@linux.vnet.ibm.com> <1377506774-5377-9-git-send-email-liwanp@linux.vnet.ibm.com> Reply-To: Wanpeng Li Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga" Return-path: Received: from kanga.kvack.org ([205.233.56.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VDsn3-0001lJ-AE for glkm-linux-mm-2@m.gmane.org; Mon, 26 Aug 2013 11:08:49 +0200 Received: from psmtp.com (na3sys010amx117.postini.com [74.125.245.117]) by kanga.kvack.org (Postfix) with SMTP id 1D59E6B0033 for ; Mon, 26 Aug 2013 05:08:47 -0400 (EDT) Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Aug 2013 06:02:55 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 457F73578050 for ; Mon, 26 Aug 2013 19:08:41 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7Q98Up22163154 for ; Mon, 26 Aug 2013 19:08:30 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r7Q98eUe008080 for ; Mon, 26 Aug 2013 19:08:40 +1000 Content-Disposition: inline In-Reply-To: <1377506774-5377-9-git-send-email-liwanp@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Wanpeng Li Cc: Andrew Morton , Andi Kleen , Fengguang Wu , Naoya Horiguchi , Tony Luck , gong.chen@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: --opJtzjQTFsWo+cga Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0009-9.patch" >>From 615b965ad33e4a18a8b977243024ef5911d2272c Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Mon, 26 Aug 2013 11:44:50 +0800 Subject: [PATCH v4 9/10] mm/hwpoison: change permission of corrupt-pfn/unpoison-pfn to 0200 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 0200. 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", 0200, hwpoison_dir, NULL, &hwpoison_fops); if (!dentry) goto fail; - dentry = debugfs_create_file("unpoison-pfn", 0600, hwpoison_dir, + dentry = debugfs_create_file("unpoison-pfn", 0200, hwpoison_dir, NULL, &unpoison_fops); if (!dentry) goto fail; -- 1.8.1.2 --opJtzjQTFsWo+cga-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org