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:   Sat, 16 Sep 2017 20:12:29 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
cc:     Fengguang Wu <fengguang.wu@...el.com>, LKP <lkp@...org>,
        LKML <linux-kernel@...r.kernel.org>,
        Don Zickus <dzickus@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: d57108d4f6 ("watchdog/core: Get rid of the thread .."): BUG:
 unable to handle kernel NULL pointer dereference at 0000000000000208

On Sat, 16 Sep 2017, Linus Torvalds wrote:
> On Sat, Sep 16, 2017 at 10:35 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
> >
> > Don't bother. I found it already. On UP we have:
> >
> > #define for_each_cpu(cpu, mask)               \
> >         for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
> >
> > which is a total fail as it breaks any code which uses for_each_cpu() or
> > any of the other variants on UP by assuming that all cpumask have bit 0
> > set.
> 
> It's fairly fundamental. UP assumes that all CPU masks are always that
> "one CPU set". Not just here - everywhere.
> 
> I guess we could somehow try to move away from that, but really, the
> assumption of fixed masks ends up simplifying the code generation a
> lot, so it made tons of sense back when UP was a primary target.
>
> So it's an approach that is somewhat historical, but I'm not sure it's
> worth re-visiting that old decision. People should simply not expect
> to traverse over empty masks in anything that is UP.
>
> So I suspect your perf fix is the right one, and maybe we could/should
> just make people more aware of the empty cpumask issue with UP.

Right, I just got a bit frightened as I really was not aware about that
'opmtimization' which means that so far I just was lucky not to trip over
it.

Thanks,

	tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ