From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: crashme on ARM - unkillable processes
Date: Sun, 9 Nov 2003 20:04:30 +0000 [thread overview]
Message-ID: <20031109200430.A2278@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0311090927350.1648-100000@home.osdl.org>; from torvalds@osdl.org on Sun, Nov 09, 2003 at 09:43:27AM -0800
On Sun, Nov 09, 2003 at 09:43:27AM -0800, Linus Torvalds wrote:
>
> On Sun, 9 Nov 2003, Russell King wrote:
> >
> > Looking at next_signal(), the kernel treats signals 1-8 as having higher
> > priority than signal 9. Since we only ever dequeue one signal on return
> > to user space, we always find the SIGILL before SIGKILL, and the kill
> > signal remains indefinitely queued.
>
> Interesting. I wonder why it shows up only now. We've run crashme as a
> sanity-test before, and I don't think this is a new thing..
Ok, I've been doing a bit more digging to work out what's going on.
The code which crashme generated corrupted the user stack pointer. We
then tried to deliver a signal, found the user stack pointer invalid,
and tried to deliver a SEGV to the process via force_sig(). Unfortunately,
this signal never made it through for the reasons described previously.
(We dequeued the ILL, found we couldn't setup the stack frame, force_sig,
returned to userspace, generated another undefined instruction exception
on the same instruction, etc.)
So, not only is userspace not able to kill off processes with SIGKILL,
but the system can't kill off a process with a seriously corrupt stack.
Should the signal code be using something more forceful than force_sig()
(ie, something which is guaranteed to work) when the stack is corrupted ?
> This is definitely a bug. I'd be inclined to just special-case SIGKILL in
> next_signal(). Better ideas?
>From the above, I think the problem is a little larger than just SIGKILL.
I think this problem happens on ARM because when we return to user space
after being unable to deliver a signal, we try to re-execute the illegal
instruction. I believe on x86 this does not occur - it returns to the
next instruction.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2003-11-09 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-09 11:43 crashme on ARM - unkillable processes Russell King
2003-11-09 12:12 ` Russell King
2003-11-09 17:43 ` Linus Torvalds
2003-11-09 20:04 ` Russell King [this message]
2003-11-09 20:42 ` Linus Torvalds
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=20031109200430.A2278@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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.