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: <20190122155455.GA20697@kroah.com>
Date:   Tue, 22 Jan 2019 16:54:55 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Quentin Perret <quentin.perret@....com>
Cc:     rafael@...nel.org, peterz@...radead.org, mingo@...hat.com,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        dietmar.eggemann@....com
Subject: Re: [PATCH] PM / EM: Expose the Energy Model in debugfs

On Tue, Jan 22, 2019 at 03:34:14PM +0000, Quentin Perret wrote:
> On Monday 07 Jan 2019 at 12:26:08 (+0000), Quentin Perret wrote:
> > diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
> > index d9dc2c38764a..8ef48daa62ff 100644
> > --- a/kernel/power/energy_model.c
> > +++ b/kernel/power/energy_model.c
> > @@ -10,6 +10,7 @@
> >  
> >  #include <linux/cpu.h>
> >  #include <linux/cpumask.h>
> > +#include <linux/debugfs.h>
> >  #include <linux/energy_model.h>
> >  #include <linux/sched/topology.h>
> >  #include <linux/slab.h>
> > @@ -23,6 +24,88 @@ static DEFINE_PER_CPU(struct em_perf_domain *, em_data);
> >   */
> >  static DEFINE_MUTEX(em_pd_mutex);
> >  
> > +#ifdef CONFIG_DEBUG_FS
> > +static struct dentry *rootdir;
> > +
> > +static int em_debug_create_cs(struct em_cap_state *cs, struct dentry *pd)
> > +{
> > +	struct dentry *d;
> > +	char name[24];
> > +
> > +	snprintf(name, sizeof(name), "cs:%lu", cs->frequency);
> > +
> > +	d = debugfs_create_dir(name, pd);
> > +	if (!d)
> > +		return -ENOMEM;
> > +
> > +	if (!debugfs_create_ulong("frequency", 0444, d, &cs->frequency))
> > +		return -ENOMEM;
> 
> Looking at the patches Greg just sent I assume all this is wrong.

Yes it is :)

> I'll send a v2 without the 'if' all over.

That would be wonderful, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ