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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 9 Jan 2018 23:14:08 +0000 (UTC)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Andrew Hunter <ahh@...gle.com>,
        maged michael <maged.michael@...il.com>,
        Avi Kivity <avi@...lladb.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Dave Watson <davejwatson@...com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andrea Parri <parri.andrea@...il.com>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH] Fix: membarrier: add missing preempt off around
 smp_call_function_many

Hi Linus,

Can you pick up this straightforward fix please ? Let me know whether
I need to re-send the patch if for some reason the original post is
too far back in your inbox.

Thanks,

Mathieu

----- On Dec 20, 2017, at 10:02 AM, Mathieu Desnoyers mathieu.desnoyers@...icios.com wrote:

> Hi Linus, Peter, Ingo,
> 
> Now that membarrier.c has been moved from kernel/ to kernel/sched/, should
> I route this membarrier fix through the scheduler maintainers, or is it OK
> to send it to you directly ?
> 
> Thanks,
> 
> Mathieu
> 
> ----- On Dec 15, 2017, at 2:23 PM, Mathieu Desnoyers
> mathieu.desnoyers@...icios.com wrote:
> 
>> smp_call_function_many requires disabling preemption around the call.
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
>> CC: Linus Torvalds <torvalds@...ux-foundation.org>
>> CC: Peter Zijlstra <peterz@...radead.org>
>> CC: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
>> CC: Boqun Feng <boqun.feng@...il.com>
>> CC: Andrew Hunter <ahh@...gle.com>
>> CC: Maged Michael <maged.michael@...il.com>
>> CC: Avi Kivity <avi@...lladb.com>
>> CC: Benjamin Herrenschmidt <benh@...nel.crashing.org>
>> CC: Paul Mackerras <paulus@...ba.org>
>> CC: Michael Ellerman <mpe@...erman.id.au>
>> CC: Dave Watson <davejwatson@...com>
>> CC: Thomas Gleixner <tglx@...utronix.de>
>> CC: Ingo Molnar <mingo@...hat.com>
>> CC: "H. Peter Anvin" <hpa@...or.com>
>> CC: Andrea Parri <parri.andrea@...il.com>
>> CC: <stable@...r.kernel.org>	# v4.14
>> ---
>> kernel/sched/membarrier.c | 2 ++
>> 1 file changed, 2 insertions(+)
>> 
>> diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c
>> index dd7908743dab..9bcbacba82a8 100644
>> --- a/kernel/sched/membarrier.c
>> +++ b/kernel/sched/membarrier.c
>> @@ -89,7 +89,9 @@ static int membarrier_private_expedited(void)
>> 		rcu_read_unlock();
>> 	}
>> 	if (!fallback) {
>> +		preempt_disable();
>> 		smp_call_function_many(tmpmask, ipi_mb, NULL, 1);
>> +		preempt_enable();
>> 		free_cpumask_var(tmpmask);
>> 	}
>> 	cpus_read_unlock();
>> --
>> 2.11.0
> 
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ