2003-07-15 06:22:13

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements

On Tue, Jul 15, 2003 at 01:02:19AM +0200, Pavel Machek wrote:

> > > > > Having listened to the arguments, I'll make pressing Escape to cancel
> > > > > the suspend a feature which defaults to being disabled and can be
> > > > > enabled via a proc entry in 2.4. I won't add code to poll for ACPI (or
> > > > > APM) events :>
> > > >
> > > > I'd suggest making it a mappable function in the keymap, like reboot is
> > > > for example. Both for initiating and stopping the suspend. How about
> > > > that?
> > >
> > > Any user can load his own keymap, I believe... And I do not like
> > > having special /proc options for esc key...
> >
> > So what? He can press ctrl-alt-del or whatever if he has access to the
> > keyboard anyway. Nevertheless I don't see any way to cause harm by
> > cancelling a sw-suspend other than if a server was shutting down due to
> > the UPS batteries being empty. And in that case the machine will be in a
> > locked room anyway.
>
> ctrl-alt-del maps to "echo you lost" on many machines. It just signals
> init, does nothing more.
>
> That UPS is bad enough... It should be okay to have server locked but
> have its keyboard/monitor publicly available.

I'm very much sure this feature (having a server locked, while
keyboard/screen is accessible) is much LESS useful than being able to
stop an suspend in progress. That's if the suspend isn't lightning fast,
of course, which is is not.

Unfortunately, while you can route the start-suspend command through
userspace (init, whatever) like the reboot command is, but I fear when
the suspend is in progress, it's not possible to talk to userspace
anymore ...

--
Vojtech Pavlik
SuSE Labs, SuSE CR


2003-07-15 10:23:08

by Pavel Machek

[permalink] [raw]
Subject: Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements

Hi!

> > > > > I'd suggest making it a mappable function in the keymap, like reboot is
> > > > > for example. Both for initiating and stopping the suspend. How about
> > > > > that?
> > > >
> > > > Any user can load his own keymap, I believe... And I do not like
> > > > having special /proc options for esc key...
> > >
> > > So what? He can press ctrl-alt-del or whatever if he has access to the
> > > keyboard anyway. Nevertheless I don't see any way to cause harm by
> > > cancelling a sw-suspend other than if a server was shutting down due to
> > > the UPS batteries being empty. And in that case the machine will be in a
> > > locked room anyway.
> >
> > ctrl-alt-del maps to "echo you lost" on many machines. It just signals
> > init, does nothing more.
> >
> > That UPS is bad enough... It should be okay to have server locked but
> > have its keyboard/monitor publicly available.
>
> I'm very much sure this feature (having a server locked, while
> keyboard/screen is accessible) is much LESS useful than being able to
> stop an suspend in progress. That's if the suspend isn't lightning fast,
> of course, which is is not.
>
> Unfortunately, while you can route the start-suspend command through
> userspace (init, whatever) like the reboot command is, but I fear when
> the suspend is in progress, it's not possible to talk to userspace
> anymore ...

No, userspace is frozen at that point.

... and so I believe right thing is to
make magic sysrq combination for aborting suspend...


--
Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...

2003-07-15 10:57:02

by Markus Gaugusch

[permalink] [raw]
Subject: Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements

On Jul 15, Pavel Machek <[email protected]> wrote:
> ... and so I believe right thing is to make magic sysrq combination for
> aborting suspend...
Pavel,
SWSusp is mainly useful for desktop users. Although there may be cases
where it is enabled on production machines, it should be aimed at desktop
users as much as possible. The features to toggle reboot and abort suspend
are really, really cool. And combining them with sysrq would just make
them very very ugly. Someone mentioned the Gnome2 disaster, and I can only
second that. Configurability IS important. And it should be easy as well
(/proc is easy enough, good people or distributors can write a script and
provide it to end users, etc.).
To make the abort of swsusp configurable is the best compromise you can
have, IMHO. I don't know why you are so stubborn and don't try to see the
'normal' people (I'm not one of those, but I'm trying to understand!!).

Markus

--
__________________ /"\
Markus Gaugusch \ / ASCII Ribbon Campaign
[email protected] X Against HTML Mail
/ \

2003-07-15 11:16:46

by Pavel Machek

[permalink] [raw]
Subject: Re: [Swsusp-devel] Re: Thoughts wanted on merging Software Suspend enhancements

Hi!

> > ... and so I believe right thing is to make magic sysrq combination for
> > aborting suspend...
> Pavel,
> SWSusp is mainly useful for desktop users. Although there may be cases
> where it is enabled on production machines, it should be aimed at desktop
> users as much as possible. The features to toggle reboot and abort suspend
> are really, really cool. And combining them with sysrq would just make
> them very very ugly. Someone mentioned the Gnome2 disaster, and I can only
> second that. Configurability IS important. And it should be easy as well
> (/proc is easy enough, good people or distributors can write a script and
> provide it to end users, etc.).
> To make the abort of swsusp configurable is the best compromise you can
> have, IMHO. I don't know why you are so stubborn and don't try to see the
> 'normal' people (I'm not one of those, but I'm trying to
> understand!!).

At one point I was suggesting that Esc feature perhaps could be done
by Esc and controlled same way magic sysrq is. No, nigel insisted that
it has to have separate config option.

I believe that's simply stupid.

Anyway, escape key has pretty well defined meaning: send ^[ to the
console. Altrough it might be nice for escape to return you back to
LILO during early boot, we are not doing that.

Kernel should do its job and policy should be in userland. "Escape
always stops suspend" is a security hole. => "Escape stops suspends"
has no place in kernel.

You might want Esc to mean ^C when user accidentaly starts "cat", but
you can't have that.

And now: special (and very ugly and very hacky) mechanism was
developed to control kernel from console. It is called magic
sysrq. Its ugly, but its also usefull. It is usable over serial
line. Aborting suspend fits in there.

Esc controlled by magic sysrq proc control is extremely ugly, but at
least it is not security hole any more, becuase user can already do
bad stuff to the computer.

Anyway, this thread is long and boring... If you are trying to
convince me with 10 000 mails "its important for users"... please
don't do that.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]