From: "tiejun.chen" <tiejun.chen@windriver.com>
To: <catalin.marinas@arm.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] kmemleak/module: only scan the existed data section
Date: Mon, 9 Jan 2012 08:59:52 +0800 [thread overview]
Message-ID: <4F0A3C08.1020801@windriver.com> (raw)
In-Reply-To: <1325059891-20540-1-git-send-email-tiejun.chen@windriver.com>
Tiejun Chen wrote:
> We should only scan the sections containing data and it's size is not
> zero as well.
Catalin,
Could you take a look at this?
Thanks
Tiejun
>
> Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
> ---
> kernel/module.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index 12cfa2b..0b93c30 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -2045,6 +2045,8 @@ static void kmemleak_load_module(struct module *mod, Elf_Ehdr *hdr,
> if (strncmp(secstrings + sechdrs[i].sh_name, ".data", 5) != 0
> && strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0)
> continue;
> + if (sechdrs[i].sh_size == 0)
> + continue;
>
> kmemleak_scan_area((void *)sechdrs[i].sh_addr,
> sechdrs[i].sh_size, GFP_KERNEL);
next prev parent reply other threads:[~2012-01-09 0:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 8:11 [PATCH 1/1] kmemleak/module: only scan the existed data section Tiejun Chen
2012-01-09 0:59 ` tiejun.chen [this message]
2012-01-09 12:05 ` Catalin Marinas
2012-01-10 2:59 ` tiejun.chen
2012-01-10 10:59 ` 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=4F0A3C08.1020801@windriver.com \
--to=tiejun.chen@windriver.com \
--cc=catalin.marinas@arm.com \
--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.