[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090815141716.GA15941@elte.hu>
Date: Sat, 15 Aug 2009 16:17:16 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kmemleak: Ignore the aperture memory hole on x86_64
* Catalin Marinas <catalin.marinas@....com> wrote:
> This block is allocated with alloc_bootmem() and scanned by
> kmemleak but the kernel direct mapping may no longer exist. This
> patch tells kmemleak to ignore this memory hole.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@....com>
> Cc: Ingo Molnar <mingo@...e.hu>
> ---
> arch/x86/kernel/aperture_64.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 676debf..cb690b3 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -94,6 +94,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);
More importantly, kmemleak should _never_ do the garbage collection
scan for device memory (such as the agp aperture above). All the
aperture areas are in that category - PCI aperture, IOMMU areas,
etc. etc.
Please double check that kmemleak does not check those - there are
devices where pure reading of that address space can have
side-effects.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists