From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: check stack pointer in get_wchan
Date: Thu, 5 Dec 2013 11:33:48 +0000 [thread overview]
Message-ID: <20131205113348.GE4360@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20131205083424.32632.51618.stgit@buzz>
On Thu, Dec 05, 2013 at 12:34:24PM +0400, Konstantin Khlebnikov wrote:
> get_wchan() is lockless. Task may wakeup at any time and change its own stack,
> thus each next stack frame may be overwritten and filled with random stuff.
>
> /proc/$pid/stack interface had been disabled for non-current tasks, see [1]
> But 'wchan' still allows to trigger stack frame unwinding on volatile stack.
>
> This patch fixes oops in unwind_frame() by adding stack pointer validation on
> each step (as x86 code do), unwind_frame() already checks frame pointer.
>
> Also I've found another report of this oops on stackoverflow (irony).
Your two patches look fine to me. Please put them in the patch system
and we'll get them merged - I think they should also be merged into stable
trees too - it looks like this goes all the way back to 2.6.30 kernels.
Thanks.
prev parent reply other threads:[~2013-12-05 11:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 8:34 [PATCH 1/2] ARM: check stack pointer in get_wchan Konstantin Khlebnikov
2013-12-05 8:34 ` [PATCH 2/2] ARM: fix framepointer check in unwind_frame Konstantin Khlebnikov
2013-12-05 12:45 ` Jean Pihet
2013-12-05 13:10 ` Konstantin Khlebnikov
2013-12-05 11:33 ` Russell King - ARM Linux [this message]
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=20131205113348.GE4360@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).