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, 26 May 2021 11:10:07 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     Frederic Weisbecker <frederic@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Yejune Deng <yejune.deng@...il.com>
Subject: Re: [PATCH] sched: Fix PF_NO_SETAFFINITY blind inheritance


Hi Frederic,

Sorry about that one; thanks for having dug into it.

On 26/05/21 01:58, Frederic Weisbecker wrote:
> One way to solve the PF_NO_SETAFFINITY issue is to not inherit this flag
> on copy_process() at all. The cases where it matters are:
>
> * fork_idle(): explicitly set the flag already.
> * fork() syscalls: userspace tasks that shouldn't be concerned by that.
> * create_io_thread(): the callers explicitly attribute the flag to the
>                       newly created tasks.
> * kernel_thread():
>       _ Fix the issues on init/1 and kthreadd
>       _ Fix the issues on kthreadd children.
>       _ Usermode helper created by an unbound workqueue. This shouldn't
>         matter. In the worst case it gives more control to userspace
>         on setting affinity to these short living tasks although this can
>         be tuned with inherited unbound workqueues affinity already.
>

(I just saw it got shoved into tip already, but in any case:)

That makes sense to me. Regarding the UMH point, I don't believe there are
others like it creeping around; otherwise we might've had to go with e.g.

  p->flags &= ~(... | (PF_NO_SETAFFINITY * !!(p->flags & PF_IDLE)))

but per the above that doesn't seem necessary.

Reviewed-by: Valentin Schneider <valentin.schneider@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ