mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
To: catalin.marinas@arm.com
Cc: linux-kernel@vger.kernel.org, ext-phil.2.carmody@nokia.com,
	linux-omap@vger.kernel.org
Subject: Re: [RFC][PATCH 0/1] kmemleak: Fix false positive with alias
Date: Fri, 17 Sep 2010 20:06:40 +0300 (EEST)	[thread overview]
Message-ID: <20100917.200640.71092280.Hiroshi.DOYU@nokia.com> (raw)
In-Reply-To: <1284740327.32322.24.camel@e102109-lin.cambridge.arm.com>

Hi Catalin,

From: ext Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [RFC][PATCH 0/1] kmemleak: Fix false positive with alias
Date: Fri, 17 Sep 2010 18:18:47 +0200

> On Tue, 2010-08-10 at 18:49 +0300, Hiroshi DOYU wrote:
>> Now there's not much difference with the attached patch, a new version
>> of alias.
>> 
>> / # modprobe kmemleak-special-test use_alias=0
>> / # time echo scan > /sys/kernel/debug/kmemleak
>> real    0m 2.30s
>> user    0m 0.00s
>> sys     0m 2.30s
>> 
>> / # modprobe kmemleak-special-test use_alias=1
>> / # time echo scan > /sys/kernel/debug/kmemleak
>> real    0m 3.91s
>> user    0m 0.00s
>> sys     0m 3.91s
> 
> So to understand - the first case is memory scanning without any aliases
> configured. The second case is the alias scanning using a separate
> prio_tree. The impact seems to be quite big.
> 
> But I wouldn't complicate the code with the callback mechanism,
> especially when loadable modules are considered. Is the pointer
> conversion always linear? Maybe we can just add an offset to the
> scan_area structure that is used for conversion rather than a callback.
>
> Another advantage of the linear offset would be that we can avoid the
> call for removing the conversion.
> 
> Is this feasible for your needs?

The formula is:

  new_value = virt_to_phys(original address) | each attributes;

Attribute bits must be ingored. So the conversion is:

  new_value &= ~each attributes;
  original address = phys_to_virt(new_value);

Could adding an offset to the scan_area solve this case?

> No point really in making it too
> generic if the simple offset would (hopefully) do.

I guess other iommu pagetable may be same?

  reply	other threads:[~2010-09-17 17:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14  7:16 [RFC][PATCH 0/2] kmemleak: Fix some false positives with special scan Hiroshi DOYU
2010-05-14  7:16 ` [PATCH 1/2] " Hiroshi DOYU
2010-05-31 16:41   ` Phil Carmody
2010-06-01 10:25   ` [PATCH v2 0/3] kmemleak: Fix false positive " Hiroshi DOYU
2010-06-02 10:01     ` Catalin Marinas
2010-06-02 11:34       ` Hiroshi DOYU
2010-06-02 12:28         ` Hiroshi DOYU
2010-06-02 14:12         ` Catalin Marinas
2010-06-03  9:54           ` Hiroshi DOYU
2010-06-18  6:04         ` [RFC][PATCH 0/1] kmemleak: Fix false positive with alias Hiroshi DOYU
2010-06-22 15:36           ` Phil Carmody
2010-06-28 14:46           ` Catalin Marinas
2010-06-29  4:44             ` Hiroshi DOYU
2010-08-10 15:49               ` Hiroshi DOYU
2010-08-27  6:12                 ` Hiroshi DOYU
2010-08-30 20:30                   ` Paul E. McKenney
2010-09-17 13:14                     ` Catalin Marinas
2010-09-17 16:18                 ` Catalin Marinas
2010-09-17 17:06                   ` Hiroshi DOYU [this message]
2010-09-17 17:28                     ` Phil Carmody
2010-06-18  6:04         ` [PATCH 1/1] " Hiroshi DOYU
2010-06-01 10:25   ` [PATCH v2 1/3] kmemleak: Fix false positives with special scan Hiroshi DOYU
2010-06-01 10:25   ` [PATCH v2 2/3] kmemleak: Add special scan test case Hiroshi DOYU
2010-06-01 10:25   ` [PATCH v2 3/3] omap iommu: kmemleak: Fix false positive with special scan Hiroshi DOYU
2010-05-14  7:16 ` [PATCH 2/2] kmemleak: test: Add a special scan test case Hiroshi DOYU

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=20100917.200640.71092280.Hiroshi.DOYU@nokia.com \
    --to=hiroshi.doyu@nokia.com \
    --cc=catalin.marinas@arm.com \
    --cc=ext-phil.2.carmody@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®