linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: segoon@openwall.com (Vasiliy Kulikov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/20] mfd: ab8500: world-writable debugfs register-* files
Date: Fri,  4 Feb 2011 15:23:43 +0300	[thread overview]
Message-ID: <c8f28aeecd5f4d05b9ae0b110831aa128754f172.1296818921.git.segoon@openwall.com> (raw)
In-Reply-To: <cover.1296818921.git.segoon@openwall.com>

Don't allow everybody to interact with hardware registers.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
 Compile tested only.

 drivers/mfd/ab8500-debugfs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index 3c1541a..64748e4 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -585,18 +585,18 @@ static int __devinit ab8500_debug_probe(struct platform_device *plf)
 		goto exit_destroy_dir;
 
 	ab8500_bank_file = debugfs_create_file("register-bank",
-		(S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev, &ab8500_bank_fops);
+		(S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_bank_fops);
 	if (!ab8500_bank_file)
 		goto exit_destroy_reg;
 
 	ab8500_address_file = debugfs_create_file("register-address",
-		(S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev,
+		(S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev,
 		&ab8500_address_fops);
 	if (!ab8500_address_file)
 		goto exit_destroy_bank;
 
 	ab8500_val_file = debugfs_create_file("register-value",
-		(S_IRUGO | S_IWUGO), ab8500_dir, &plf->dev, &ab8500_val_fops);
+		(S_IRUGO | S_IWUSR), ab8500_dir, &plf->dev, &ab8500_val_fops);
 	if (!ab8500_val_file)
 		goto exit_destroy_address;
 
-- 
1.7.0.4

  parent reply	other threads:[~2011-02-04 12:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-04 12:22 [PATCH 00/20] world-writable files in sysfs and debugfs Vasiliy Kulikov
2011-02-04 12:23 ` [PATCH 01/20] mach-omap2: mux: world-writable debugfs files Vasiliy Kulikov
2011-02-04 20:09   ` Tony Lindgren
2011-02-04 12:23 ` [PATCH 02/20] mach-omap2: pm: world-writable debugfs timer files Vasiliy Kulikov
2011-02-04 20:10   ` Tony Lindgren
2011-02-04 22:53   ` Kevin Hilman
2011-02-04 12:23 ` [PATCH 03/20] mach-omap2: smartreflex: world-writable debugfs voltage files Vasiliy Kulikov
2011-02-04 20:10   ` Tony Lindgren
2011-02-04 22:54   ` Kevin Hilman
2011-02-07  5:33     ` Menon, Nishanth
2011-02-04 12:23 ` [PATCH 04/20] mach-ux500: mbox-db5500: world-writable sysfs fifo file Vasiliy Kulikov
2011-02-04 12:23 ` [PATCH 08/20] mfd: ab3100: world-writable debugfs *_priv files Vasiliy Kulikov
2011-02-04 12:23 ` [PATCH 09/20] mfd: ab3500: world-writable debugfs register-* files Vasiliy Kulikov
2011-02-04 12:23 ` Vasiliy Kulikov [this message]
2011-02-04 13:11 ` [rtc-linux] [PATCH 00/20] world-writable files in sysfs and debugfs Linus Walleij
2011-03-12 20:23 ` Vasiliy Kulikov
2011-03-14 22:18   ` [Security] " Andrew Morton
2011-03-15  2:26   ` James Bottomley
2011-03-15  3:09     ` [Security] " Greg KH
2011-03-15 11:50       ` James Bottomley
2011-03-15 14:18         ` Greg KH
2011-03-15 14:25           ` James Bottomley
2011-03-15 16:08         ` Vasiliy Kulikov
2011-03-15 16:32           ` James Bottomley

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=c8f28aeecd5f4d05b9ae0b110831aa128754f172.1296818921.git.segoon@openwall.com \
    --to=segoon@openwall.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).