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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0802120032160.27876@sbz-30.cs.Helsinki.FI>
Date:	Tue, 12 Feb 2008 00:32:59 +0200 (EET)
From:	Pekka J Enberg <penberg@...helsinki.fi>
To:	mpm@...enic.com
cc:	jdike@...toit.com, blaisorblade@...oo.it, clameter@....com,
	linux-kernel@...r.kernel.org
Subject: [PATCH] slob: fix linking for user mode linux

From: Pekka Enberg <penberg@...helsinki.fi>

UML has some header magic that expects a non-inline __kmalloc() function to be
available. Fixes the following link time errors:

arch/um/drivers/built-in.o: In function `kmalloc':
/home/penberg/linux-2.6/arch/um/include/um_malloc.h:14: undefined reference to `__kmalloc'
/home/penberg/linux-2.6/arch/um/include/um_malloc.h:14: undefined reference to `__kmalloc'
/home/penberg/linux-2.6/arch/um/include/um_malloc.h:14: undefined reference to `__kmalloc'
/home/penberg/linux-2.6/arch/um/include/um_malloc.h:14: undefined reference to `__kmalloc'
/home/penberg/linux-2.6/arch/um/include/um_malloc.h:14: undefined reference to `__kmalloc'
arch/um/drivers/built-in.o:/home/penberg/linux-2.6/arch/um/include/um_malloc.h:14: more undefined references to `__kmalloc' follow

Cc: Jeff Dike <jdike@...toit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@...oo.it>
Cc: Matt Mackall <mpm@...enic.com>
Cc: Christoph Lameter <clameter@....com>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
Matt, does this look ok to you? Can we merge it via Christoph's tree?

 include/linux/slob_def.h |    5 +----
 mm/slob.c                |    6 ++++++
 2 files changed, 7 insertions(+), 4 deletions(-)

Index: linux-2.6/include/linux/slob_def.h
===================================================================
--- linux-2.6.orig/include/linux/slob_def.h	2008-01-12 01:00:37.000000000 +0200
+++ linux-2.6/include/linux/slob_def.h	2008-02-12 00:27:38.000000000 +0200
@@ -28,9 +28,6 @@
 	return __kmalloc_node(size, flags, -1);
 }
 
-static inline void *__kmalloc(size_t size, gfp_t flags)
-{
-	return kmalloc(size, flags);
-}
+extern void *__kmalloc(size_t size, gfp_t flags);
 
 #endif /* __LINUX_SLOB_DEF_H */
Index: linux-2.6/mm/slob.c
===================================================================
--- linux-2.6.orig/mm/slob.c	2008-02-11 23:47:19.000000000 +0200
+++ linux-2.6/mm/slob.c	2008-02-12 00:27:38.000000000 +0200
@@ -486,6 +486,12 @@
 }
 EXPORT_SYMBOL(__kmalloc_node);
 
+void *__kmalloc(size_t size, gfp_t gfp)
+{
+	return __kmalloc_node(size, gfp, -1);
+}
+EXPORT_SYMBOL(__kmalloc);
+
 void kfree(const void *block)
 {
 	struct slob_page *sp;
--
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