Skip to contentSkip to conversation

SAK: If a process is killed by SAK, give us an info about which one was killed

PATCH In review Marc-Christian Petersen 3 participants 8 messages Aug 1, 2003 – Aug 5, 2003 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SAK: If a process is killed by SAK, give us an info about which one was killed

Hi Marcelo,

$subject says it all.

Please apply for 2.4.22-pre10. Thank you :)

ciao, Marc

drivers/char/tty_io.c +0 -0
@@ -1888,6 +1888,9 @@
	for_each_task(p) {
		if ((p->tty == tty) ||
		    ((session > 0) && (p->session == session))) {
+				printk(KERN_NOTICE "SAK: killed process %d"
+				" (%s): p->session==tty->session\n",
+				p->pid, p->comm);
			send_sig(SIGKILL, p, 1);
			continue;
		}
@@ -1898,6 +1898,9 @@
				filp = fcheck_files(p->files, i);
				if (filp && (filp->f_op == &tty_fops) &&
				    (filp->private_data == tty)) {
+						printk(KERN_NOTICE "SAK: killed process %d"
+						" (%s): fd#%d opened to the tty\n",
+						p->pid, p->comm, i);
					send_sig(SIGKILL, p, 1);
					break;
				}
#1 lore raw
Quoted 7 lines · Marc-Christian Petersen

Hi Marcelo,

$subject says it all.

Please apply for 2.4.22-pre10. Thank you :)

ciao, Marc

This is potentially private information. It shouldnt be reported I disagree with the patch

#2 lore raw

On Friday 01 August 2003 14:09, Alan Cox wrote:

Hi Alan,

Quoted 2 lines

This is potentially private information. It shouldnt be reported I disagree with the patch

well, it get logged to syslog(3) and dmesg(8). No normal user has access to it, no?

ciao, Marc

#3 lore raw

On Friday 01 August 2003 14:26, Marc-Christian Petersen wrote:

Hi Alan,

Quoted 2 lines

well, it get logged to syslog(3) and dmesg(8). No normal user has access to it, no?

forget it. Mainline kernels give the normal user access to dmesg :)

ciao, Marc

#4 lore raw
In reply to Marc-Christian Petersen
Quoted 8 lines · Marc-Christian Petersen

On Friday 01 August 2003 14:09, Alan Cox wrote:

Hi Alan,

Quoted 2 lines

This is potentially private information. It shouldnt be reported I disagree with the patch

well, it get logged to syslog(3) and dmesg(8). No normal user has access to it, no?

It may also end up on the console

#5 lore raw
In reply to Alan Cox

Hi!

Quoted 8 lines
Quoted 5 lines

$subject says it all.

Please apply for 2.4.22-pre10. Thank you :)

ciao, Marc

This is potentially private information. It shouldnt be reported I disagree with the patch

I agree it is not good enough for 2.4.X, but it looks good to me for 2.6. That information can be get by ps, right? If we decide it is not okay to print process names to syslog, maybe oom killer should be fixed, too?
Pavel

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#6 lore raw
Quoted 4 lines · Pavel Machek

I agree it is not good enough for 2.4.X, but it looks good to me for 2.6. That information can be get by ps, right? If we decide it is not okay to print process names to syslog, maybe oom killer should be fixed, too?

SAK allows me to see what was running without having an account on the box

#7 lore raw

Hi!

Quoted 6 lines
Quoted 4 lines

I agree it is not good enough for 2.4.X, but it looks good to me for 2.6. That information can be get by ps, right? If we decide it is not okay to print process names to syslog, maybe oom killer should be fixed, too?

SAK allows me to see what was running without having an account on the box

Hmm, but current situation in such case is an admin with some dead processes and no idea what went wrong :-(

Signature · 2 lines
				Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...