lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1803292109180.2750@hadrien>
Date:   Thu, 29 Mar 2018 21:12:06 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Francisco Jerez <currojerez@...eup.net>
cc:     kbuild-all@...org,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Len Brown <lenb@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        0day robot <fengguang.wu@...el.com>
Subject: [PATCH] OPTIONAL: cpufreq/intel_pstate: fix debugfs_simple_attr.cocci
 warnings

 Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
 for debugfs files.

Semantic patch information:
 Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
 imposes some significant overhead as compared to
 DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Fixes: 9eec7989e762 ("OPTIONAL: cpufreq/intel_pstate: Expose LP controller parameters via debugfs.")
CC: Francisco Jerez <currojerez@...eup.net>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---

I don't actually know anything about this issue.  The change was suggested
by kbuild.

 intel_pstate.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -885,7 +885,7 @@ static int lp_param_get(void *data, u64
 	*val = *(u32 *)data;
 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(fops_lp_param, lp_param_get, lp_param_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fops_lp_param, lp_param_get, lp_param_set, "%llu\n");

 static struct dentry *debugfs_parent;

@@ -922,9 +922,10 @@ static void intel_pstate_debug_expose_pa
 	for (i = 0; lp_files[i].name; i++) {
 		struct dentry *dentry;

-		dentry = debugfs_create_file(lp_files[i].name, 0660,
-					     debugfs_parent, lp_files[i].value,
-					     &fops_lp_param);
+		dentry = debugfs_create_file_unsafe(lp_files[i].name, 0660,
+						    debugfs_parent,
+						    lp_files[i].value,
+						    &fops_lp_param);
 		if (!IS_ERR(dentry))
 			lp_files[i].dentry = dentry;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ