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]
Message-ID: <20191115042411.GA11061@chenyu-office.sh.intel.com>
Date:   Fri, 15 Nov 2019 12:24:11 +0800
From:   Yu Chen <yu.c.chen@...el.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Tony Luck <tony.luck@...el.com>, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org,
        Alexey Dobriyan <adobriyan@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] x86/resctrl: Add task resctrl information display

Hi Boris,
Thanks for looking at the patch.
On Wed, Nov 13, 2019 at 07:23:07PM +0100, Borislav Petkov wrote:
> On Thu, Nov 07, 2019 at 11:27:31AM +0800, Chen Yu wrote:
> > Monitoring tools that want to find out which resctrl CTRL
> > and MONITOR groups a task belongs to must currently read
> > the "tasks" file in every group until they locate the process
> > ID.
> > 
> > Add an additional file /proc/{pid}/resctrl to provide this
> > information.
> > 
> > For example:
> >  cat /proc/1193/resctrl
> > CTRL_MON:/ctrl_grp0
> > MON:/ctrl_grp0/mon_groups/mon_grp0
> > 
> > If the resctrl filesystem has not been mounted,
> > reading /proc/{pid}/resctrl returns an error:
> > cat: /proc/1193/resctrl: No such device
> > 
> > Tested-by: Jinshi Chen <jinshi.chen@...el.com>
> > Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
> > Reviewed-by: Fenghua Yu <fenghua.yu@...el.com>
> > Reviewed-by: Tony Luck <tony.luck@...el.com>
> > Signed-off-by: Chen Yu <yu.c.chen@...el.com>
> > 
> > ---
> >  arch/x86/include/asm/resctrl_sched.h   |  4 +++
> >  arch/x86/kernel/cpu/resctrl/rdtgroup.c | 46 ++++++++++++++++++++++++++
> >  fs/proc/base.c                         |  9 +++++
>    ^^^^^^^^^^^^^^^
> 
> So you're touching this file here and yet your Cc list doesn't have
> *anyone* who might be responsible for the proc fs (yeah, you have
> linux-fsdevel but I don't think that's enough). Have you heard of
> scripts/get_maintainer.pl?
> 
> Use it in the future.
> 
> Cc-ing some more people for the generic /proc bits.
> 
Okay, thanks.
> >  3 files changed, 59 insertions(+)
> > 
> > +
> > +		if (rdtg->closid == tsk->closid) {
> 
> Save an indentation level:
> 
> 		if (rdtg->closid != tsk->closid)
> 			continue;
> 
> 		seq_printf...
>
Okay.
> > +#ifdef CONFIG_X86_CPU_RESCTRL
> > +#include <asm/resctrl_sched.h>
> > +#endif
> 
> If anything, this should be abstracted nicely into an
> include/linux/resctrl.h header. Other architectures would probably wanna
> use it too, I hear ARM64 has something like resctrl.
>
Okay, created this header in the next version.
> > +#endif
> > +#ifdef CONFIG_X86_CPU_RESCTRL
> > +	ONE("resctrl", S_IRUGO, proc_resctrl_show),
> >  #endif
> 
> Same here. proc_resctrl_show() looks like a generic function but it
> is x86-only. Need to call the x86-specific one in a real generic
> proc_resctrl_show() which other arches can add their code to, too.
> 
> Not like that.
> 
Okay, in next version proc_resctrl_show() is declared in resctrl.h.
However since there's no common c source file for resctrl currently,
different architectures might need to implement proc_resctrl_show()
accordingly - currently only x86 needs to do that.

Thanks,
Chenyu
> -- 
> Regards/Gruss,
>     Boris.
> 
> https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ