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:   Thu, 6 Apr 2017 12:35:16 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Mike Galbraith <efault@....de>, Ingo Molnar <mingo@...e.hu>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>
Subject: Re: [RFC PATCH] kernel: sched: Provide a pointer to the valid CPU
 mask

On Thu, Apr 06, 2017 at 11:46:33AM +0200, Sebastian Andrzej Siewior wrote:
> On 2017-04-06 11:32:24 [+0200], Peter Zijlstra wrote:
> > On Tue, Apr 04, 2017 at 08:42:02PM +0200, Sebastian Andrzej Siewior wrote:
> > > While converting the existing users I tried to stick with the rules
> > > above however… well mostly CPUFREQ tries to temporary switch the CPU
> > > mask to do something on a certain CPU and then switches the mask back it
> > > its original value.
> > 
> > 
> > There's a bunch of that through ancient and rotten parts of the kernel.
> > All those sites are broken.
> > 
> > Nothing stops userspace from setting a different affinity right after
> > the kernel does for those threads.
> 
> Good. So you are saying I should convert them to something like
> queue_work_on()?

Not sure; iirc there were a few variants. Some can indeed simply do
queue_work_on() and possibly wait for completion. some should maybe be a
per-cpu kthread, others will be more 'interesting'.

IIRC MIPS has a case where only 1 in N cores has an FPU. And once a task
uses FPU, it gets affined to the core that has one or something like
that.

Of course, nothing then stops someone else breaking that affinity. But I
suspect it will simply fault on the next FPU instruction and 'reset' the
mask or something. I've no clue and no real desire to know.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ