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:	Tue, 07 Oct 2014 09:46:59 +0200
From:	Philippe Rétornaz 
	<philippe.retornaz@...il.com>
To:	Guenter Roeck <linux@...ck-us.net>, linux-kernel@...r.kernel.org
CC:	linux-m32r-ja@...linux-m32r.org, linux-mips@...ux-mips.org,
	linux-efi@...r.kernel.org, linux-ia64@...r.kernel.org,
	Heiko Stuebner <heiko@...ech.de>,
	Len Brown <len.brown@...el.com>, linux-xtensa@...ux-xtensa.org,
	Pavel Machek <pavel@....cz>, devel@...verdev.osuosl.org,
	linux-s390@...r.kernel.org, lguest@...ts.ozlabs.org,
	linux-c6x-dev@...ux-c6x.org, linux-hexagon@...r.kernel.org,
	linux-sh@...r.kernel.org, Alexander Graf <agraf@...e.de>,
	linux-acpi@...r.kernel.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	xen-devel@...ts.xenproject.org, devicetree@...r.kernel.org,
	user-mode-linux-devel@...ts.sourceforge.net,
	linux-pm@...r.kernel.org,
	adi-buildroot-devel@...ts.sourceforge.net,
	linux-m68k@...ts.linux-m68k.org, linux-am33-list@...hat.com,
	linux-tegra@...r.kernel.org,
	openipmi-developer@...ts.sourceforge.net,
	linux-metag@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-parisc@...r.kernel.org, linux-cris-kernel@...s.com,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	linux-alpha@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Romain Perier <romain.perier@...il.com>,
	linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 01/44] kernel: Add support for poweroff handler call chain

Hello

This seems exactly what I would need on the mc13783 to handle cleanly 
the poweroff,
but after reading this patchset I have the following question:

[...]

> +/*
> + *	Notifier list for kernel code which wants to be called
> + *	to power off the system.
> + */
> +static ATOMIC_NOTIFIER_HEAD(poweroff_handler_list);

[...]

> +void do_kernel_poweroff(void)
> +{
> +	atomic_notifier_call_chain(&poweroff_handler_list, 0, NULL);
> +}
> +

It seems that the poweroff callback needs to be atomic as per
_atomic_notifier_call_chain documentation:

	"Calls each function in a notifier chain in turn.  The functions
	 run in an atomic context"

But this is a problem for many MFD (mc13783, twl4030 etc ...) which are
accessible on only a blocking bus (SPI, I2C).

What I am missing here ?

Thanks,

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