mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: linux-os@analogic.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux-2.6.11 can't disable CAD
Date: Thu, 7 Apr 2005 11:59:04 -0700	[thread overview]
Message-ID: <20050407115904.1d1ee28f.rddunlap@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0504071102590.4871@chaos.analogic.com>

On Thu, 7 Apr 2005 11:16:14 -0400 (EDT) Richard B. Johnson wrote:

| 
| In the not-too distant past, one could disable Ctl-Alt-DEL.
| Can't do it anymore.

What should disabling C_A_D do?

| Script started on Thu 07 Apr 2005 10:58:11 AM EDT
| [SNIPPED leading stuff...]
| 
| mprotect(0xb7fe4000, 28672, PROT_READ|PROT_EXEC) = 0
| brk(0)                                  = 0x804a000
| brk(0x8053000)                          = 0x8053000
| reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_CAD_OFF) = 0
| pause( <unfinished ...>
| _exit(0)                                = ?
| # exit
| Script done on Thu 07 Apr 2005 10:58:21 AM EDT

What program is that?  I'm just echoing 0 | 1 into
/proc/sys/kernel/ctrl-alt-del , is that equivalent?
or have you tried that?

| Observe that reboot() returns 0 and `strace` understands what
| parameters were passed. The result is that, if I hit Ctl-Alt-Del,
| `init` will still execute the shutdown-order (INIT 0).

echo 0 > /proc/sys/kernel/ctrl-alt-del
  is same as CAD_OFF
echo 1
  is same as CAD_ON

I tested 2.4.28, 2.6.3, 2.6.9, 2.6.11, and all of them behaved
the same way for me.  If it's an issue with using a syscall
to change the setting, I'll be glad to look into that too.

observed behaviors:
CAD enabled + C_A_D keys => call machine_reboot()
  to reboot quickly, no normal shutdown sequence;
CAD disabled + C_A_D keys => kill init, go thru normal
  clean shutdown sequence;
are these the expected behaviors?

| A side note, while researching this problem, I think I found
| that LINUX_REBOOT_MAGIC2 is Linus' birthday (in hex). Maybe
| the problem is that he no longer observes his birthday?

---
~Randy

  reply	other threads:[~2005-04-07 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 15:16 Richard B. Johnson
2005-04-07 18:59 ` Randy.Dunlap [this message]
2005-04-07 19:46   ` Richard B. Johnson
2005-04-07 20:08     ` Randy.Dunlap
2005-04-07 20:35       ` Richard B. Johnson
2005-04-07 20:20 ` Jan Harkes
2005-04-07 20:50   ` Richard B. Johnson
2005-04-08 13:05     ` Daniel Jacobowitz
2005-04-08 13:54       ` Richard B. Johnson
     [not found]     ` <20050407210144.GA8181@delft.aura.cs.cmu.edu>
     [not found]       ` <Pine.LNX.4.61.0504080822150.8739@chaos.analogic.com>
2005-04-08 20:54         ` Richard B. Johnson

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=20050407115904.1d1ee28f.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®