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-prev] [day] [month] [year] [list]
Message-ID: <1574334.EZHJkPPKZd@vostro.rjw.lan>
Date:	Tue, 09 Feb 2016 21:20:31 +0100
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	"Rafael J. Wysocki" <rafael@...nel.org>,
	Juri Lelli <juri.lelli@....com>,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Saravana Kannan <skannan@...eaurora.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Michael Turquette <mturquette@...libre.com>,
	Steve Muckle <steve.muckle@...aro.org>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Morten Rasmussen <morten.rasmussen@....com>,
	dietmar.eggemann@....com,
	Shilpasri G Bhat <shilpa.bhat@...ux.vnet.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3 03/13] cpufreq: governor: New sysfs show/store callbacks for governor tunables

On Tuesday, February 09, 2016 08:51:26 AM Viresh Kumar wrote:
> On 08-02-16, 22:36, Rafael J. Wysocki wrote:
> > On Mon, Feb 8, 2016 at 12:39 PM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> > > +       ret = kobject_init_and_add(&dbs_data->kobj, &gov->kobj_type,
> > > +                                  get_governor_parent_kobj(policy),
> > > +                                  gov->kobj_name);
> > 
> > Besides, you forgot about the format argument for kobject_init_and_add().
> 
> What about that? Why is it required here ? We don't have to modify the
> gov->gov.name string at all, and that string can be used here without adding any
> more format arguments.

But that's because the governor name is a static string and we can safely pass
it as a format (because we know that it doesn't contain any output field specifiers
in particular).

So either there should be a comment to that effect in the code, or the format
argument should be present.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ