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-next>] [day] [month] [year] [list]
Date:	Sat, 02 Jun 2007 23:27:40 +0200
From:	Bodo Eggert <7eggert@....de>
To:	Tejun Heo <htejun@...il.com>, David Greaves <david@...eaves.com>,
	"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
	IDE Linux <linux-ide@...r.kernel.org>,
	ballen@...vity.phys.uwm.edu
Subject: Re: 2.6.22-rc3 hibernate(?) disables SMART on ide

Tejun Heo <htejun@...il.com> wrote:
> David Greaves wrote:

>> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
>> disabled when I resume.

<snip>

Maybe it's disabled by the BIOS?

> According to the ATA standard, the device (drive) itself is responsible
> for preserving SMART enabled status over power cycles.  It seems your
> drive doesn't wanna do that.  I don't think mangling with SMART setup in
> the kernel is wise thing to do.  Bruce, any ideas?  Maybe hook smartd
> such that it gets suspend/resume events?

1) Enabling smart is a single command
2) The command should not fail, and if it fails, it's probably because
   it's not supported. There is nothing userspace can do better or worse.
3) There should be no bad effect from enabling smart, except if the BIOS
   insists on not booting because of a bad RAID disk. (That's why I like
   to disable it in the BIOS)
4) Not enabling smart is a common failure in many setups. Usurally the admin
   will have to enumerate the attached disks and patch the smartctl startup
   scripts.
5) Sometimes there is no smartd (or udev) running, and you'll still not want
   to re-enable smart each time you suspend.
6) A simple udev rule or smartd hook should be bigger than the code required
   in-kernel.

Therefore I suggest setting the smart-enabled-bit in the kernel, in spite of
not being the kernel's duty. It would be a 99,99% DTRT.

OTOH: What would happen if the drive's command queue is full?
What happens for DMA handling (can we hitch-hike)?
Is it possible to just enqueue "enable_smart($DEV)"?

-- 
Top 100 things you don't want the sysadmin to say:
48. Tell me again what that '-r' option to rm does

Friß, Spammer: VmngZze7@...7eggert.dyndns.org EPlKiav@...gert.dyndns.org
-
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