public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: Andy Whitcroft <apw@canonical.com>,
	linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	Alexander Graf <agraf@suse.de>, Gleb Natapov <gleb@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Kalle Valo <kvalo@codeaurora.org>,
	Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] checkpatch: catch all world writable debugfs_create_file
Date: Fri, 13 Mar 2015 13:42:52 -0700	[thread overview]
Message-ID: <1426279372.11459.34.camel@perches.com> (raw)
In-Reply-To: <1426274602-21196-1-git-send-email-hofrat@osadl.org>

On Fri, 2015-03-13 at 15:23 -0400, Nicholas Mc Guire wrote:
> Currently checkpatch will fuss if one uses world writable settings in debugfs
> files by passing S_IWUGO but not when passing S_IWOTH, S_IRWXUGO or S_IALLUGO.
> This patch extends the check to catches all cases exporting world writable 
> files

Maybe the debugfs_create_file should be debugfs_create_\w+

And there are also these octal matches:

$ git grep -E -n "debugfs.*\b0[0-7][0-7][2367]"
arch/mips/cavium-octeon/oct_ilm.c:75:   show_dentry = debugfs_create_file("statistics", 0222, dir, NULL,
arch/mips/cavium-octeon/oct_ilm.c:82:   show_dentry = debugfs_create_file("reset", 0222, dir, NULL,
arch/powerpc/kvm/timing.c:226:  debugfs_file = debugfs_create_file(dbg_fname, 0666,
drivers/misc/genwqe/card_debugfs.c:376: file = debugfs_create_x64("err_inject", 0666, root, &cd->err_inject);
drivers/misc/genwqe/card_debugfs.c:382: file = debugfs_create_u32("ddcb_software_timeout", 0666, root,
drivers/misc/genwqe/card_debugfs.c:389: file = debugfs_create_u32("kill_timeout", 0666, root,
drivers/misc/genwqe/card_debugfs.c:461:         file = debugfs_create_u32(name, 0666, root,
drivers/misc/genwqe/card_debugfs.c:483: file = debugfs_create_u32("skip_recovery", 0666, root,
drivers/misc/genwqe/card_debugfs.c:490: file = debugfs_create_u32("use_platform_recovery", 0666, root,
drivers/net/wireless/mac80211_hwsim.c:2452:     debugfs_create_file("ps", 0666, data->debugfs, data, &hwsim_fops_ps);
drivers/net/wireless/mac80211_hwsim.c:2453:     debugfs_create_file("group", 0666, data->debugfs, data,
drivers/net/wireless/mac80211_hwsim.c:2456:             debugfs_create_file("dfs_simulate_radar", 0222,
drivers/power/axp288_fuel_gauge.c:333:  info->debug_file = debugfs_create_file("fuelgauge", 0666, NULL,
drivers/power/da9030_battery.c:191:     charger->debug_file = debugfs_create_file("charger", 0666, NULL,
kernel/trace/blktrace.c:499:    bt->msg_file = debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops);



  parent reply	other threads:[~2015-03-13 20:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 19:23 [PATCH] checkpatch: catch all world writable debugfs_create_file Nicholas Mc Guire
2015-03-13 20:16 ` Joe Perches
2015-03-13 20:42 ` Joe Perches [this message]
2015-03-13 23:43 ` [PATCH] checkpatch: match more world writable permissions Joe Perches
2015-03-14  7:35   ` Nicholas Mc Guire
2015-03-14 14:32   ` Guenter Roeck
2015-03-14 15:42     ` Joe Perches
2015-03-17 23:17   ` Andrew Morton
2015-03-18  5:56     ` Joe Perches

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=1426279372.11459.34.camel@perches.com \
    --to=joe@perches.com \
    --cc=agraf@suse.de \
    --cc=apw@canonical.com \
    --cc=benh@kernel.crashing.org \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gleb@kernel.org \
    --cc=hofrat@osadl.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=rostedt@goodmis.org \
    --cc=sre@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