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:	Mon, 20 Oct 2008 18:00:58 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Ivan Vecera <ivecera@...hat.com>
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, nhorman@...hat.com, jmarchan@...hat.com
Subject: Re: [PATCH] x86: call machine_shutdown and stop all CPUs in
	native_machine_halt


* Ivan Vecera <ivecera@...hat.com> wrote:

> Function machine_halt (resp. native_machine_halt) is empty for x86 
> architectures. When command 'halt -f' is invoked, the message "System 
> halted." is displayed but this is not really true because all CPUs are 
> still running. There are also similar inconsistencies for other arches 
> (some uses power-off for halt or forever-loop with IRQs 
> enabled/disabled). IMO there should be used the same approach for all 
> architectures OR what does the message "System halted" really mean?

no fundamental objections, but could you please do it a bit cleaner:

>  static void native_machine_halt(void)
>  {
> +	/* stop other cpus and apics */
> +	machine_shutdown();
> +
> +	/* stop this cpu */
> +	local_irq_disable();
> +	if (hlt_works(smp_processor_id()))
> +		for (;;) halt();
> +	for (;;);
>  }

the code in arch/x86/kernel/smp.c::stop_this_cpu() is very similar to 
this and could be shared. You could move the stop_this_cpu() function to 
arch/x86/kernel/process.c (out of smp.c), so that it can be used by 
reboot.c.

furthermore, native_machine_power_off() should probably fall back to 
native_machine_halt() as well - should pm_power_off() be disabled (or if 
it fails to stop the machine).

hm?

	Ingo
--
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