All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linuxppc-dev@lists.ozlabs.org
Subject: [Bug 216156] [bisected] kmemleak: Not scanning unknown object at 0xc00000007f000000
Date: Mon, 09 Oct 2023 04:36:58 +0000	[thread overview]
Message-ID: <bug-216156-206035-floAnHKXAG@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-216156-206035@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=216156

Michael Ellerman (michael@ellerman.id.au) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |michael@ellerman.id.au

--- Comment #13 from Michael Ellerman (michael@ellerman.id.au) ---
Thanks for the bisect.

I think I see what's happening. pmac_probe() is called before
mem_topology_setup(), so the min/max PFN variables are still zero. That causes
kmemleak_alloc_phys() to ignore the allocation, because the checks against the
PFN fail. Then kmemleak_no_scan() can't find the allocation and prints that
warning.

Can you try this, it moves the kmemleak_no_scan() call later:

diff --git a/arch/powerpc/sysdev/dart_iommu.c
b/arch/powerpc/sysdev/dart_iommu.c
index 98096bbfd62e..3883cb8a747e 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -243,9 +243,6 @@ static void __init allocate_dart(void)
        if (!dart_tablebase)
                panic("Failed to allocate 16MB below 2GB for DART table\n");

-       /* There is no point scanning the DART space for leaks*/
-       kmemleak_no_scan((void *)dart_tablebase);
-
        /* Allocate a spare page to map all invalid DART pages. We need to do
         * that to work around what looks like a problem with the HT bridge
         * prefetching into invalid pages and corrupting data
@@ -435,6 +432,9 @@ static int __init iommu_init_late_dart(void)
        if (!dart_tablebase)
                return 0;

+       // There is no point scanning the DART table for leaks.
+       kmemleak_no_scan(dart_tablebase);
+
        ppc_md.iommu_restore = iommu_dart_restore;

        return 0;

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2023-10-09  4:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 23:14 [Bug 216156] New: kmemleak: Not scanning unknown object at 0xc00000007f000000 bugzilla-daemon
2022-06-20 23:15 ` [Bug 216156] " bugzilla-daemon
2022-06-20 23:30 ` bugzilla-daemon
2022-06-20 23:37 ` bugzilla-daemon
2022-08-25  0:39 ` bugzilla-daemon
2022-08-25  0:40 ` bugzilla-daemon
2022-11-14 22:11 ` bugzilla-daemon
2022-11-14 22:12 ` bugzilla-daemon
2023-08-19 23:00 ` bugzilla-daemon
2023-08-19 23:01 ` bugzilla-daemon
2023-10-05 23:41 ` [Bug 216156] [bisected] " bugzilla-daemon
2023-10-05 23:43 ` bugzilla-daemon
2023-10-05 23:43 ` bugzilla-daemon
2023-10-09  4:36 ` bugzilla-daemon [this message]
2023-10-09 15:50 ` bugzilla-daemon
2023-10-10 12:14 ` bugzilla-daemon
2023-10-10 18:21 ` bugzilla-daemon
2024-04-19  8:30 ` bugzilla-daemon

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=bug-216156-206035-floAnHKXAG@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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.