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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 20 Nov 2019 15:54:46 +0800
From:   Yu Chen <yu.chen.surf@...il.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Chen Yu <yu.c.chen@...el.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will@...nel.org>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Michal Hocko <mhocko@...e.com>,
        Kees Cook <keescook@...omium.org>,
        Christian Brauner <christian@...uner.io>,
        Shakeel Butt <shakeelb@...gle.com>,
        Casey Schaufler <casey@...aufler-ca.com>,
        Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
        Kent Overstreet <kent.overstreet@...il.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/2][v2] x86/resctrl: Add task resctrl information display

Hi Boris,

On Mon, Nov 18, 2019 at 10:48 PM Borislav Petkov <bp@...en8.de> wrote:
>
> On Sat, Nov 16, 2019 at 11:01:12PM +0800, Ryan Chen wrote:
> > Right, we can return 'blank' to user and let the user to parse the information.
>
> There is nothing to parse - the task doesn't belong to any groups. That's it.
>
> > And there is a similar behavior in cgroup that, for kernel thread that
> > does not belong
> > to any cgroup, /proc/{pid}/cgroup just show 'blank' without returning an error.
>
> By 'blank' I assume you mean the empty string '' ?
>
Yes, it is 'empty string'.
> > Yes, only when PROC_FS is set, /proc/{pid}/resctrl
> > can be displayed. However, CPU_RESCTRL might not
> > depend on proc fs, it is possible that the CPU_RESCTRL
> > is enabled but without PROC_FS set. If I understand correctly,
> >  CPU_RESCTRL is the 'root' config for X86_CPU_RESCTRL,
> > after reading this thread:
> > https://lists.gt.net/linux/kernel/3211659
>
> I'm not sure I know what you mean here. There's no CPU_RESCTRL option - you've
> added it in the previous patch:
>
> [ ~/kernel/linux> git grep -E CONFIG_CPU_RESCTRL
> [ ~/kernel/linux> git grep -E "\WCPU_RESCTRL"
> [ ~/kernel/linux>
>
> And if you want to use that option in proc/, then it needs
> to depend on PROC_FS, like the the example I gave you with
> CONFIG_PROC_PID_ARCH_STATUS.
>
> Or do you mean something else?
>
Previously I was thinking of introducing CONFIG_CPU_RESCTRL
to the kernel, so that platform-independent resctrl code could be moved under
this config. The idea was seen in the following commit log:
commit e6d429313ea5c776d (x86/resctrl: Avoid confusion over the
new X86_RESCTRL config)
But since we only touch proc fs in this patch, I think a config named
CONFIG_PROC_CPU_RESCTRL declared in fs/proc/Kconfig
might be more appropriate(similar to CONFIG_PROC_PID_ARCH_STATUS).
> >  If this is the case, shall we add the new file at kernel/resctrl/resctrl.c?
> > And the generic proc_resctrl_show() could be put into this file. In the future
> > the generic code for resctrl could be added/moved to kernel/resctrl/resctrl.c
>
> Not worth it for a single function. Leave it in
> arch/x86/kernel/cpu/resctrl/rdtgroup.c where you had it.
>
Okay, got it. Let me send the v3 patch out and to see if it is suitable.
Thanks,
Chenyu
> Thx.
>
> --
> 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