From: Catalin Marinas <catalin.marinas@arm.com>
To: Dirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Problem] kernel hangs at boot (bisected 892d208bcf)
Date: Thu, 19 Jan 2012 14:00:58 +0000 [thread overview]
Message-ID: <20120119140058.GA19036@arm.com> (raw)
In-Reply-To: <gi1uqvsx8n.fsf@karga.hank.lab>
On Thu, Jan 19, 2012 at 12:16:56PM +0000, Dirk Gouders wrote:
> Catalin Marinas <catalin.marinas@arm.com> writes:
> > On Wed, Jan 18, 2012 at 07:32:59PM +0000, Dirk Gouders wrote:
> >> Freeing unused kernel memory: 608k freed
> >> kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
> >> BUG: unable to handle kernel paging request at ffffffff818b232b
> >> IP: [<ffffffff818b232b>] kmemleak_late_init+0x8a/0x8a
...
> >> Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc <cc> cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
> >> RIP [<ffffffff818b232b>] kmemleak_late_init+0x8a/0x8a
> >
> > I don't really see how kmemleak could cause such error (or any of the
> > recent changes I have made). It looks like some of the code in the
> > .init.text section is not executable.
Ah, the interesting part - 0xcc is the poison value for freed initmem.
And from the kernel logs you posted Linux frees the initmem and later
calls kmemleak_late_init() which should have been in the .init.text
section.
The kmemleak_late_init() function is defined as:
static int __init kmemleak_late_init(void)
{
...
}
late_initcall(kmemleak_late_init);
and it must *not* be called after the initmem has been freed. Was there
any change in the x86 or generic code with regards to the freeing of the
init memory?
--
Catalin
next prev parent reply other threads:[~2012-01-19 14:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 19:32 [Problem] kernel hangs at boot (bisected 892d208bcf) Dirk Gouders
2012-01-19 11:01 ` Catalin Marinas
2012-01-19 12:16 ` Dirk Gouders
2012-01-19 14:00 ` Catalin Marinas [this message]
2012-01-19 14:38 ` Dirk Gouders
2012-01-19 15:37 ` Catalin Marinas
2012-01-19 17:43 ` Dirk Gouders
2012-01-19 19:58 ` Dirk Gouders
2012-01-19 20:52 ` Dirk Gouders
2012-01-20 2:20 ` Josh Boyer
2012-01-20 9:22 ` Catalin Marinas
2012-01-20 11:01 ` Catalin Marinas
2012-01-20 12:14 ` Dirk Gouders
2012-01-20 14:16 ` Josh Boyer
2012-01-20 14:21 ` Catalin Marinas
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=20120119140058.GA19036@arm.com \
--to=catalin.marinas@arm.com \
--cc=gouders@et.bocholt.fh-gelsenkirchen.de \
--cc=linux-kernel@vger.kernel.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.