From: Knut Petersen <Knut_Petersen@t-online.de>
To: Ingo Molnar <mingo@kernel.org>, Frederic Weisbecker <fweisbec@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>, Greg KH <greg@kroah.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG 3.12.rc4] Oops: unable to handle kernel paging request during shutdown
Date: Tue, 15 Oct 2013 09:53:39 +0200 [thread overview]
Message-ID: <525CF483.1020908@t-online.de> (raw)
In-Reply-To: <20131015064025.GA22672@gmail.com>
On 15.10.2013 08:40, Ingo Molnar wrote:
> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
>> I've been thinking that CONFIG_DEBUG_LIST could help. Unfortunately it's
>> good to spot list APIs misuse but, if Linus is right, the problem may be
>> that the list belongs to an object that has been freed, and I believe
>> that won't detect such a thing.
> Use-after free should be reliably detectable via CONFIG_DEBUG_PAGEALLOC=y.
Enabled.
Hmm ... I think i spotted a KConfig bug. In mm/Kconfig.debug I read:
config DEBUG_PAGEALLOC
bool "Debug page memory allocations"
depends on DEBUG_KERNEL
depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
depends on !KMEMCHECK
select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
select PAGE_GUARD if ARCH_SUPPORTS_DEBUG_PAGEALLOC
---help---
Unmap pages from the kernel linear mapping after free_pages().
This results in a large slowdown, but helps to find certain types
of memory corruption.
For architectures which don't enable ARCH_SUPPORTS_DEBUG_PAGEALLOC,
fill the pages with poison patterns after free_pages() and verify
the patterns before alloc_pages(). Additionally,
this option cannot be enabled in combination with hibernation as
that would result in incorrect warnings of memory corruption after
a resume because free pages are not saved to the suspend image.
Either the description or the "depends" line that includes !HIBERNATION is wrong. Maybe
depends on DEBUG_KERNEL
- depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
+ depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
depends on !KMEMCHECK
is correct, at least does not allow HIBERNATION and DEBUG_PAGEALLOC to be enabled simultaneously.
>
> A couple of years ago I wrote a list debugging beast that would catch
> use-after-free mishaps (sent it to lkml too IIRC), but it was a bit
> complex and I never found the time to nurse it upstream.
>
> Thanks,
>
> Ingo
>
next prev parent reply other threads:[~2013-10-15 7:53 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <525BD08C.2080101@t-online.de>
2013-10-14 17:53 ` [BUG 3.12.rc4] Oops: unable to handle kernel paging request during shutdown Linus Torvalds
2013-10-14 21:28 ` Paul E. McKenney
2013-10-14 21:51 ` Frederic Weisbecker
2013-10-14 22:31 ` Knut Petersen
2013-10-14 22:43 ` Frederic Weisbecker
2013-10-15 6:40 ` Ingo Molnar
2013-10-15 7:53 ` Knut Petersen [this message]
2013-10-17 14:25 ` Frederic Weisbecker
2013-10-18 6:30 ` Ingo Molnar
2013-10-14 21:52 ` Knut Petersen
2013-10-14 23:16 ` Paul E. McKenney
2013-10-15 0:59 ` Paul E. McKenney
2013-10-15 8:06 ` Knut Petersen
2013-10-25 8:38 ` Linus Torvalds
2013-10-25 9:02 ` Linus Torvalds
2013-10-25 9:08 ` Paul E. McKenney
2013-10-25 9:17 ` Greg Kroah-Hartman
2013-10-25 9:13 ` Greg Kroah-Hartman
2013-10-25 9:28 ` Rafael J. Wysocki
2013-10-25 9:28 ` Rafael J. Wysocki
2013-10-25 9:51 ` Rafael J. Wysocki
2013-10-25 9:54 ` Viresh Kumar
2013-10-25 10:10 ` Rafael J. Wysocki
2013-10-25 10:00 ` Viresh Kumar
2013-10-25 10:07 ` Linus Torvalds
2013-10-25 11:10 ` Rafael J. Wysocki
2013-10-25 13:49 ` Viresh Kumar
2013-10-25 14:21 ` Rafael J. Wysocki
2013-10-28 15:02 ` Knut Petersen
2013-10-25 10:23 ` Thomas Gleixner
2013-10-25 10:48 ` Linus Torvalds
2013-10-26 11:43 ` Ingo Molnar
2013-10-28 14:50 ` Knut Petersen
2013-10-28 15:01 ` Ingo Molnar
2013-10-28 15:16 ` Ingo Molnar
2013-10-28 15:45 ` Knut Petersen
2013-10-27 20:20 ` Linus Torvalds
2013-10-27 20:39 ` Linus Torvalds
2013-10-27 21:13 ` Linus Torvalds
2013-10-27 21:24 ` Greg Kroah-Hartman
2013-10-28 17:23 ` Bjorn Helgaas
2013-10-28 17:30 ` Veaceslav Falico
2013-10-28 17:35 ` Bjorn Helgaas
2013-10-28 17:39 ` Veaceslav Falico
2013-10-28 18:52 ` Greg Kroah-Hartman
2013-10-30 18:04 ` Pablo Neira Ayuso
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=525CF483.1020908@t-online.de \
--to=knut_petersen@t-online.de \
--cc=fweisbec@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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.