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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 31 Mar 2017 11:15:22 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Fenghua Yu <fenghua.yu@...el.com>
cc:     Jiri Olsa <jolsa@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Mike Galbraith <efault@....de>, Shaohua Li <shli@...com>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] x86/intel_rdt: Add cpus_list rdtgroup file

On Wed, 29 Mar 2017, Fenghua Yu wrote:
> >  static int rdtgroup_cpus_show(struct kernfs_open_file *of,
> > -			      struct seq_file *s, void *v)
> > +			      struct seq_file *s, void *v,
> > +			      unsigned long flags)
> >  {
> > +	const char *fmt = flags & RFTYPE_FLAGS_CPUS_LIST ? "%*pbl\n" : "%*pb\n";
> 
> Change to:
> + const char *fmt = strcmp(of->kn->priv, "cpus") ? "%*pbl\n" : "%*pb\n";

You couldn't come up with a more horrible hack, right?

Jiri was right with adding the flag to the base files, just the propagation
through the callbacks sucks. What's wrong with:

	struct rftype *rft = of->kn->priv;
	bool list = rtf->flags & RFTYPE_FLAGS_CPUS_LIST;

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ