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: <bpbyx7d567ctpoqutwy2sk6dh7xsilrglnkoomcfgrtrqtjwtl@tajyt523goqu>
Date: Thu, 16 Jan 2025 14:59:20 +0100
From: Alejandro Colomar <alx@...nel.org>
To: Phil Auld <pauld@...hat.com>
Cc: linux-man@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] sched: Mention autogroup disabled behavior

Hi Phil,

On Thu, Jan 16, 2025 at 08:53:15AM -0500, Phil Auld wrote:
> This is actually part of the problem. It's very hard to see this
> from userspace. I can show a shell session that shows that autogroup
> is disabled and that my task has an autogroup in /proc but determining
> that the autogroup is not being used not so much. (I may be missing
> something obvious but I could not find it).
> 
> I had to look at the kernel code:
> 
> kernel/sched/autogroup.h:
> static inline struct task_group *
> autogroup_task_group(struct task_struct *p, struct task_group *tg)
> {
>         extern unsigned int sysctl_sched_autogroup_enabled;
>         int enabled = READ_ONCE(sysctl_sched_autogroup_enabled);
> 
>         if (enabled && task_wants_autogroup(p, tg))
>                 return p->signal->autogroup->tg;
> 
>         return tg;
> }
> 
> bool task_wants_autogroup(struct task_struct *p, struct task_group *tg)
> {
>         if (tg != &root_task_group)
>                 return false;
>     ...
> 
> }
> 
> The former being called from sched_group_fork() and sched_get_task_group().
> 
> I suppose looking at /proc/pid/cgroup and seeing it report not "0::/"
> is part of it since it then won't be in root task group.
> 
> To some extent any systemd based system these days is not really
> using autogroup at all anyway. 
> 
> I can put some of the above in there or just something like:
> 
> # cat /proc/sys/kernel/sched_autogroup_enabled 
> 0
> # cat /proc/$$/autogroup 
> /autogroup-112 nice 0
> 
> 
> Thoughts?

Both.  :)

The more information we have in the commit message, the better (in case
someone needs to check in the future, that will give more context).


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es/>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ