public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Karol Kozimor <sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
To: Patrick Mochel <mochel-3NddpPZAyC0@public.gmane.org>
Cc: Jens Haug
	<haug-X6ztD3ggwzuBAmxm6OvjtTjhTm2NLCe8@public.gmane.org>,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: System hang when trying to enter sleep/standby state
Date: Thu, 13 Feb 2003 22:32:54 +0100	[thread overview]
Message-ID: <20030213213253.GA28780@hell.org.pl> (raw)
In-Reply-To: <Pine.LNX.4.33.0302131031290.1133-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Thus wrote Patrick Mochel:
> > > You're absolutely right. But, most people do those things deliberately, 
> > > and know the consequences. 
> > Do you think someone becomes root and does an "echo 5 > /proc/acpi/sleep"
> > by accident? ;-)
> Definitely. By, trying a range of values, they stumble on one that crashes 
> their system. 

Yeah, as if all the values worked smoothly on all systems. Echoing '1' or
'3' hangs my system in most (S1) or all cases (S3). Should they be
excluded also, or left as a config option? Enabled when they finally work
and are tested on all possible systems?

> > > Think about how this thread started: $Random User sees his system doesn't
> > > suspend when writing '4' to that file, so he tries every other value.
> > This is not a random user. This is someone who plays around with his
> > system while testing beta kernel drivers. 
> > The random user at this stage doesn't know about acpi at all. The
> > random user in the future (when acpi comes with Suse or RedHat Linux 
> > out of the box) will only use the GUIs to suspend and such. So there's
> > no problem at all, I think.
> The GUIs should not, and will not, support writing directly to that file. 
> In the perfect, abstract future, we will not even have /proc/acpi/sleep, 
> we will have an abstracted for entering sleep states. 

So, if you plan to change this anyway in the future (of ACPI becoming
mainstream, or being included in distros), what is really the reason of
changing it now, during the development steage?

Again, should I pull the reset button off my chassis just because I can
accidentally push it, have my machine rebooted, and oh my oh my, loose my
data? Is there really anybody who experiments with the sleep states not
having synced, or otherwise "secured" his data or filesystems?

[...]
> As a whole, we do enforce a minimum amount of policy we do not want to 
> lose users data. And that will happen. 
> 
> Let me repeat, and try and get you to listen: 
> 
> You *will* corrupt your data if you do not flush the disk buffers. 
> You *will* corrupt your data if you do not flush the disk buffers. 
> You *will* corrupt your data if you do not flush the disk buffers. 
> 
> That's why it's so slow when you do a normal shutdown. That's why 
> immediately putting the system into S5 is so fast - we don't flush the 
> buffers. 

This is obvious. At least for halfway intelligent users, who know what they
are doing. As Jens said, no random user will ever tamper with /proc, and if
he does, well, it's all his fault anyway.

[...]
> You are right, though, if they start writing random values into /proc, it 
> is their fault. But, the random range of numbers to be written to  
> /proc/acpi/sleep is small, and not that random. The documentation suggests 
> that some values work and others don't. It's human nature to exercise 
> curiosity and experiment with other close values. If they do, which they 
> are so likely to, I do not want to see them cause any harm to themselves. 

So let the documentation suggest explicitly, what exactly echoing 5 to that
file does? Anyway, as I said earlier, chances are that other values
will cause them equal harm. So what? Is that really the single way to harm
the machine, or cause filesystem corruption? I knew a user, who, when told
to copy a file on /dev/hda1, did exactly what he was said, i.e. "cp
filename /dev/hda1"... does this show that copying over a block device
should be disabled? That something is *generally* a bad idea doesn't mean,
it has no use whatsoever. 

Really, on modern desktops possibly data-corrupting reboots (due to a 
faulty X / DRI / whatever driver) are much more frequent to really care for
a poor user that experiments with ACPI not knowing much about it.

> > > For another, as mentioned before, we have safe mechanisms for halting a 
> > > system. See 'man 1 halt'. 
> > You have *no* other mechanism to turn your box off in less than one
> > second.
> Then concentrate on that, and don't encourage dangerous features in the 
> kernel. 

To be frank, there are some features in the kernel, that during the
configuration stage are labeled as ,,DANGEROUS''. For what reasons, do you
think, they still exist?

Regards,

-- 
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

  parent reply	other threads:[~2003-02-13 21:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13 16:28 System hang when trying to enter sleep/standby state Jens Haug
     [not found] ` <200302131628.h1DGSID27482-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
2003-02-13 16:46   ` Patrick Mochel
     [not found]     ` <Pine.LNX.4.33.0302131031290.1133-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-13 21:32       ` Karol Kozimor [this message]
2003-02-13 22:09       ` Pavel Machek
2003-02-13 19:00   ` Darren Benham
     [not found]     ` <51181.64.164.111.5.1045162852.squirrel-FG1iuTdj8bisTnJN9+BGXg@public.gmane.org>
2003-02-13 19:02       ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2003-02-14  7:53 Jens Haug
     [not found] ` <200302140753.h1E7rOD00889-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
2003-02-14 14:38   ` Patrick Mochel
     [not found]     ` <Pine.LNX.4.33.0302140836140.1067-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-17  5:40       ` Christian Zoz
2003-02-14  7:50 Jens Haug
2003-02-13  6:59 Jens Haug
     [not found] ` <200302130659.h1D6x7D22714-sBhUd1W9t4xfrO0PeCDDO4ECbGbo6+O1OOFObY0sJ7w@public.gmane.org>
2003-02-13 16:01   ` Patrick Mochel
2003-02-08 15:41 Erik van Pienbroek
     [not found] ` <026401c2cf88$9b26d330$0a0110ac-QyX2VyNvpUU@public.gmane.org>
2003-02-08 16:19   ` Jean-Pierre Schwickerath
2003-02-08 18:59   ` Pavel Machek
     [not found]     ` <02bc01c2d030$ac23f340$0a0110ac@erik>
     [not found]       ` <20030209114731.GD26151@atrey.karlin.mff.cuni.cz>
     [not found]         ` <20030209114731.GD26151-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2003-02-11 18:10           ` Erik van Pienbroek
     [not found]             ` <1044987042.1149.4.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-12 16:47               ` Patrick Mochel
     [not found]                 ` <Pine.LNX.4.33.0302121042480.1479-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-02-12 20:36                   ` Karol Kozimor
     [not found]                     ` <20030212203637.GA32274-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-02-12 21:08                       ` Patrick Mochel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030213213253.GA28780@hell.org.pl \
    --to=sziwan-detuoxkzssqrdjvtcaxf/a@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=haug-X6ztD3ggwzuBAmxm6OvjtTjhTm2NLCe8@public.gmane.org \
    --cc=mochel-3NddpPZAyC0@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox