Re: [PATCH] kmemleak: Ignore the aperture memory hole on x86_64

From: Ingo Molnar
Date: Sun Aug 16 2009 - 06:08:42 EST



* Catalin Marinas <catalin.marinas@xxxxxxx> 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@xxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> ---
> 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);

i tried this in -tip, it causes this build error:

arch/x86/kernel/aperture_64.c: In function âallocate_apertureâ:
arch/x86/kernel/aperture_64.c:101: error: implicit declaration of function âkmemleak_ignoreâ

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/