From: "Randy.Dunlap" <rddunlap@osdlab.org>
To: Alan <alan@lxorguk.ukuu.org.uk>,
crutcher+kernel@datastacks.com,
lkml <linux-kernel@vger.kernel.org>,
paulus@au.ibm.com
Subject: Magic SysRq +# in 2.4.9-ac/2.4.10-pre12
Date: Wed, 19 Sep 2001 08:56:13 -0700 [thread overview]
Message-ID: <3BA8C01D.79FBD7C3@osdlab.org> (raw)
(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
next reply other threads:[~2001-09-19 15:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-19 15:56 Randy.Dunlap [this message]
2001-09-19 16:30 ` Magic SysRq +# in 2.4.9-ac/2.4.10-pre12 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
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=3BA8C01D.79FBD7C3@osdlab.org \
--to=rddunlap@osdlab.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=crutcher+kernel@datastacks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@au.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.