public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Magic SysRq +# in 2.4.9-ac/2.4.10-pre12
@ 2001-09-19 15:56 Randy.Dunlap
  2001-09-19 16:30 ` Randy.Dunlap
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Randy.Dunlap @ 2001-09-19 15:56 UTC (permalink / raw)
  To: Alan, crutcher+kernel, lkml, paulus

(and maybe earlier...)

Simple problems grow...

Keith Owens has already noted one problem in sysrq.c (2.4.10-pre12).

Beginning:

I have an IBM model KB-9910 keyboard.  When I use
Alt+SysRQ+number (number: 0...9) on it to change the
console loglevel, only keys 5 and 6 have the desired
effect.  I used showkey -s to view the scancodes from
the other <number> keys, but showkey didn't display
anything for them.  Any other suggestions?


For now, I'm just using different (non-number) keys
to modify the loglevel.

Anyway, in looking at SysRq loglevel handling in
2.4.9-ac (and 2.4.10-pre12), I see that it has been modified
quite a bit.  Looks extensible, which can be good.
However, looking over it gave me several nagging questions
and problems.

1.  Was this stuff tested?  How ???

It always sets console_loglevel and then restores
console_loglevel from orig_log_level, so Alt+SysRq+#
handling is severely broken.

If someone (Crutcher ?) wants to patch it, that's fine.
If I patched it, I would just add a
  next_loglevel = -1;
at the beginning of __handle_sysrq_nolock() and then
let the loglevel handler(s) set next_loglevel.
If next_loglevel != -1 at the end of __handle_sysrq_nolock(),
set console_loglevel to next_loglevel.

2.  I'd really prefer to see callers use
register_sysrq_key() and unregister_sysrq_key() so that they
can get/use return values, and not the lower-level functions
"__sysrq*" functions that are EXPORTed in sysrq.c.
I don't see a good reason to EXPORT all of these functions.

E.g., arch/ppc64/start/xmon.c calls __sysrq_put_key_op('x', ...).
It doesn't know (and cannot know) whether this call succeeded
or not.

3.  And the sysrq_key_table[] (comments) should end with
w, x, y, z, not with w, x, w, z.


~Randy

You can't do anything without having to do something else first. 
         -- Belefant's Law

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2001-10-03 15:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-19 15:56 Magic SysRq +# in 2.4.9-ac/2.4.10-pre12 Randy.Dunlap
2001-09-19 16:30 ` Randy.Dunlap
2001-09-19 16:42 ` Alan Cox
2001-09-19 18:02   ` Randy.Dunlap
2001-09-19 17:31 ` Erik Mouw
2001-09-19 17:34   ` Randy.Dunlap
2001-09-19 17:50     ` Randy.Dunlap
2001-09-19 17:52     ` Erik Mouw
2001-09-19 20:22 ` Vojtech Pavlik
2001-09-21 20:29 ` Crutcher Dunnavant
2001-09-26 20:38   ` Pavel Machek
2001-10-03 15:08     ` Crutcher Dunnavant
2001-09-21 21:08 ` Crutcher Dunnavant
2001-09-21 21:41   ` [PATCH] Magic SysRq loglevel fix Crutcher Dunnavant
2001-09-22  1:25     ` Randy.Dunlap
2001-09-22  5:16       ` Crutcher Dunnavant
2001-09-21 21:42   ` Magic SysRq +# in 2.4.9-ac/2.4.10-pre12 Randy.Dunlap
2001-09-21 22:07     ` Crutcher Dunnavant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox