From: Ingo Molnar <mingo@elte.hu>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] kmemleak: Ignore the aperture memory hole on x86_64
Date: Mon, 31 Aug 2009 10:38:13 +0200 [thread overview]
Message-ID: <20090831083813.GD15619@elte.hu> (raw)
In-Reply-To: <1251556208.5518.5.camel@pc1117.cambridge.arm.com>
* Catalin Marinas <catalin.marinas@arm.com> wrote:
> On Sat, 2009-08-29 at 15:31 +0200, Ingo Molnar wrote:
> > * Catalin Marinas <catalin.marinas@arm.com> wrote:
> > > --- a/arch/x86/kernel/aperture_64.c
> > > +++ b/arch/x86/kernel/aperture_64.c
> > > @@ -20,6 +20,7 @@
> > > #include <linux/bitops.h>
> > > #include <linux/ioport.h>
> > > #include <linux/suspend.h>
> > > +#include <linux/kmemleak.h>
> > > #include <asm/e820.h>
> > > #include <asm/io.h>
> > > #include <asm/iommu.h>
> > > @@ -94,6 +95,11 @@ static u32 __init allocate_aperture(void)
> > > * code for safe
> > > */
> > > p = __alloc_bootmem_nopanic(aper_size, aper_size, 512ULL<<20);
> > > + /*
> > > + * Kmemleak should not scan this block as it may not be mapped via the
> > > + * kernel direct mapping.
> > > + */
> > > + kmemleak_ignore(p);
> > > if (!p || __pa(p)+aper_size > 0xffffffff) {
> > > printk(KERN_ERR
> > > "Cannot allocate aperture memory hole (%p,%uK)\n",
> >
> > This sure does not look right for the rare but theoretically
> > possible !p case, does it?
>
> All the kmemleak_* callbacks check for (p && !IS_ERR(p)), just to
> simplify the calling site.
Indeed, i see. It's OK this way then.
Ingo
prev parent reply other threads:[~2009-08-31 8:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 17:02 [PATCH 0/2] kmemleak: x86-related patches Catalin Marinas
2009-08-27 17:02 ` [PATCH 1/2] kmemleak: Inform kmemleak about kernel stack allocation Catalin Marinas
2009-08-29 13:29 ` Ingo Molnar
2009-08-29 14:28 ` Catalin Marinas
2009-08-29 15:08 ` Catalin Marinas
2009-08-31 8:45 ` Ingo Molnar
2009-09-01 9:25 ` Catalin Marinas
2009-09-04 6:57 ` Ingo Molnar
2009-09-04 14:45 ` Catalin Marinas
2009-08-31 9:04 ` Paul Mundt
2009-08-27 17:02 ` [PATCH 2/2] kmemleak: Ignore the aperture memory hole on x86_64 Catalin Marinas
2009-08-29 13:31 ` Ingo Molnar
2009-08-29 14:30 ` Catalin Marinas
2009-08-31 8:38 ` Ingo Molnar [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=20090831083813.GD15619@elte.hu \
--to=mingo@elte.hu \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox