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: <alpine.DEB.2.00.1210091254220.30555@chino.kir.corp.google.com>
Date:	Tue, 9 Oct 2012 13:00:46 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Wen Congyang <wency@...fujitsu.com>
cc:	Tang Chen <tangchen@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>, mingo@...hat.com,
	peterz@...radead.org, miaox@...fujitsu.com,
	linux-kernel@...r.kernel.org, linux-numa@...r.kernel.org
Subject: Re: [PATCH] Do not use cpu_to_node() to find an offlined cpu's
 node.

On Tue, 9 Oct 2012, Wen Congyang wrote:

> I clear cpu-to-node mapping when the cpu is hotremoved. If the cpu is onlined,
> it will be offlined before clearing cpu-to-node mapping.
> 
> Here is the code in driver/acpi/processor_driver.c:
> =============
> static int acpi_processor_handle_eject(struct acpi_processor *pr)
> {
> 	if (cpu_online(pr->id))
> 		cpu_down(pr->id);      <========== cpu is offlined here.
> 
> 	arch_unregister_cpu(pr->id);
> 	acpi_unmap_lsapic(pr->id);     <========== I clear the mapping here.
> 	return (0);
> }
> =============
> 
> The real problem is that: we don't migrate this task to another cpu when
> the cpu is offlined. I guess this task is not in running state, and it
> is not in the cpu's runqueue.
> 

ACPI is not the only way to offline a cpu, this all needs to be 
standardized throughout the kernel for each arch so that generic code like 
sched can use cpu_to_node() in a CPU_DYING callback.  The only way to do 
that is by having arch callbacks to set cpu-to-node to NUMA_NO_NODE only 
at CPU_DEAD.

> This patch is try to fix a bug: the kernel will be panicked after removing a
> node.
> 

That's much more subtle than having a NULL pointer dereference like Tang 
reports during migration.
--
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