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:   Sun, 28 Jun 2020 16:42:02 -0300
From:   Henrique de Moraes Holschuh <hmh@....eng.br>
To:     Simon Arlott <simon@...iron.net>
Cc:     Damien Le Moal <Damien.LeMoal@....com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Jonathan Corbet <corbet@....net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH] scsi: sd: stop SSD (non-rotational) disks before reboot

On Sun, 28 Jun 2020, Simon Arlott wrote:
> On 23/06/2020 21:42, Henrique de Moraes Holschuh wrote:
> > [1] I have long lost the will and energy to pursue this, so *this* is a
> > throw-away anecdote for anyone that cares: I reported here a few years
> > ago that many models of *SATA* based SSDs from Crucial/Micron, Samsung
> > and Intel were complaining (through their SMART attributes) that Linux
> > was causing unsafe shutdowns.
> > 
> > https://lkml.org/lkml/2017/4/10/1181
> > 
> > TL;DR: wait one *extra* second after the SSD acknowleged the STOP
> > command as complete before you trust the SSD device is safe to be
> > powered down (i.e. before reboot, suspend, poweroff/shutdown, and device
> > removal/detach).  This worked around the issue for every vendor and
> > model of SSD we tested.
> 
> Looking through that thread, it looks like a simple 1 second delay on
> shutdown/reboot patch hasn't been proposed yet?

It should work, yes.  And it likely would help with whatever $RANDOM
other hardware that has the same issues but has no way to make itself
noticed, so *I* would appreciate it as something I could tell the kernel
to *always* do.

But for "sd" devices, it would be likely more complete to also ensure
the delay for device removal (not just on reboot and power off).

> In my case none of the SSDs are recording unexpected power loss if they
> are stopped before the reboot, but the reboot won't necessarily be
> instantaneous after the last stop command returns.

Yes, it is a race.  If either the SSD happens to need less "extra" time,
or the computer takes a bit longer to reboot/power off, all is well.
Otherwise, the SSD loses the race, and gets powered down at an
inappropriate time.

-- 
  Henrique Holschuh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ