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: <20190722191914.GE6698@worktop.programming.kicks-ass.net>
Date:   Mon, 22 Jul 2019 21:19:14 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Nadav Amit <namit@...are.com>
Cc:     Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        the arch/x86 maintainers <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Rik van Riel <riel@...riel.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v3 1/9] smp: Run functions concurrently in
 smp_call_function_many()

On Mon, Jul 22, 2019 at 06:34:22PM +0000, Nadav Amit wrote:
> > On Jul 22, 2019, at 11:21 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> > 
> > On Thu, Jul 18, 2019 at 05:58:29PM -0700, Nadav Amit wrote:
> >> +/*
> >> + * Call a function on all processors.  May be used during early boot while
> >> + * early_boot_irqs_disabled is set.
> >> + */
> >> +static inline void on_each_cpu(smp_call_func_t func, void *info, int wait)
> >> +{
> >> +	on_each_cpu_mask(cpu_online_mask, func, info, wait);
> >> +}
> > 
> > I'm thinking that one if buggy, nothing protects online mask here.
> 
> on_each_cpu_mask() calls __on_each_cpu_mask() which would disable preemption.
> The mask might change, but anyhow __smp_call_function_many() would “and” it,
> after disabling preemption, with (the potentially updated) cpu_online_mask.

Ah, indeed, as long as we double check the state after disabling
preemption things should be fine.

> What is your concern?

Pavlov reaction to seeing a naked cpu_online_mask :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ