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]
Message-id: <556ED06B.9030601@samsung.com>
Date:	Wed, 03 Jun 2015 12:01:15 +0200
From:	Marek Szyprowski <m.szyprowski@...sung.com>
To:	Heiko Stübner <heiko@...ech.de>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Alexandre Courbot <acourbot@...dia.com>,
	Guenter Roeck <linux@...ck-us.net>
Cc:	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Usage of restart_handler in pwrseq_emmc

Hello,

On 2015-06-02 17:29, Heiko Stübner wrote:
> I'm confused by the pwrseq-emmc registering a restart_handler for resetting an
> emmc in a panic-reboot case at priority 129 to "schedules it just before
> system reboot".
>
> >From what I remember from the restart-handler discussion the actuall usage is
> traversing the ordered list until one registered handler sucessfully restarts
> the system and not to have arbitary actions in there not related to the actual
> restart process?
>
> The actual documentation in kernel/reboot.c supports this assumption,
> describing register_restart_handler as "Register function to be called to
> reset the system".
>
>
> Additionally, 128 isn't even _the_ priority to reboot the system as described
> above and some drivers use higher priorities per default, see in
> drivers/power/reset arm-versatile-reboot.c; at91-reset.c; rmobile-reset.c and
> some more.
>
>
> So I guess this should use some other mechanism (reboot notifier) instead of
> restart_handlers?

The first problem with reboot notifiers is that they are called too 
early - before
device_shutdown(), what interferes with the code in mmc_bus_shutdown and 
causes
lockup. The second problem is
that reboot notifiers are not called from emergency_restart() path. I 
agree that
129 value for priority might not be the best, maybe according to 
documentation,
255 value should be used to ensure that the handler will be called first 
before
any real restart handler.

If you have any idea how to avoid restart handler and ensure proper eMMC 
card
reboot sequence on any system reboot, I'm open for suggestions.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

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