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] [day] [month] [year] [list]
Message-ID: <20101123173137.GA7205@redhat.com>
Date:	Tue, 23 Nov 2010 18:31:37 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-tip-commits@...r.kernel.org, linux-kernel@...r.kernel.org,
	hpa@...or.com, mingo@...hat.com, tglx@...utronix.de, mingo@...e.hu
Subject: Re: [tip:sched/core] cpu: Remove incorrect BUG_ON

On 11/23, Peter Zijlstra wrote:
>
> On Tue, 2010-11-23 at 16:08 +0100, Oleg Nesterov wrote:
> > > Ah,. uhm,. you mean, not do anything at all?
> > >
> > > Dunno, really, let me try and read the code there.
> >
> > Thanks. This is very minor of course, but it would be nice to
> > undestand the reason. To me it looks unneeded, but I don't trust
> > myself.  (snippets from my previous email below).
> >
> I think because the call to __cpu_die (-> native_cpu_die) relies on the
> remote cpu running the idle thread,

How? It can't. By the time __cpu_die() is called, we do not even
know whether context_switch() was finished. All we know is that
rq->curr = idle.

native_cpu_die() correctly waits in a loop until the idle thread
sets CPU_DEAD.

And I think every smp_ops->cpu_die() implementation should synhcronize
with ->cpu_disable(), otherwise it is buggy.

> and the CPU_DEAD notifier callback
> wants to run with the guarantee the remote cpu is in fact dead as a
> doornail.

I think __cpu_die() should ensure it is dead.


OK. This is really minor. Perhaps it is safer to keep this wait just
to preserve the current behaviour.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ