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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to