lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 13 Sep 2006 16:00:23 +0800
From:	Aubrey <aubreylee@...il.com>
To:	"Nick Piggin" <nickpiggin@...oo.com.au>
Cc:	"David Howells" <dhowells@...hat.com>,
	"Matt Mackall" <mpm@...enic.com>, linux-kernel@...r.kernel.org,
	davidm@...pgear.com, gerg@...pgear.com
Subject: Kobjsize issue

Hi all,

Many embedded systems are using their own algorithm to mange one block
of memory for DMA ops, which is uncached and usually behind of the
kernel memory heap.

So, here, kobjsize will run into kernel BUGs, too.
Because the allocated memory comes from behind memory_end, and doesn't
have the appropriate structures initialized used by the kernel to
maintain memory. And then, kobjsize triggers BUG_ON(page->index
>=MAX_ORDER);

My current solution is a patch as follows. That's really an ugly
workaround, evey kobjsize call will return 0 if the address is behind
of the kernel system memory heap.
What's your thoughts?

Thanks,
-Aubrey
=============================================================
diff --git a/mm/nommu.c b/mm/nommu.c
index c576df7..f4cc8a9 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -109,7 +109,7 @@ unsigned int kobjsize(const void *objp)
 {
        struct page *page;

-       if (!objp || !((page = virt_to_page(objp))))
+       if (!objp || !((page = virt_to_page(objp))) || (unsigned
long)objp >= memory_end)
                return 0;

        if (PageSlab(page))
=============================================================
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ