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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365302138-19736-2-git-send-email-mcgrof@do-not-panic.com>
Date:	Sat,  6 Apr 2013 19:35:36 -0700
From:	"Luis R. Rodriguez" <mcgrof@...not-panic.com>
To:	backports@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org,
	"Luis R. Rodriguez" <mcgrof@...not-panic.com>
Subject: [PATCH 1/3] compat: redefine core_initcall() and late_initcall()

From: "Luis R. Rodriguez" <mcgrof@...not-panic.com>

It is questionable if we'd want to backport calls declared
through late_initcall() or core_initcall() on the kernel
but if this ends up being desired the current of copying
kernel code requires either patching or redefining these
symbols to make them build.

To avoid having to maintain patches for these components
and having to delcare these routines on header files through
compat manually use these init macros to help us define
symbols we *can* use on the compat module init.

Signed-off-by: Luis R. Rodriguez <mcgrof@...not-panic.com>
---
 backport/include/linux/compat-2.6.h |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/backport/include/linux/compat-2.6.h b/backport/include/linux/compat-2.6.h
index 57a1c13..109afd4 100644
--- a/backport/include/linux/compat-2.6.h
+++ b/backport/include/linux/compat-2.6.h
@@ -18,6 +18,21 @@
 #include <linux/init.h>
 #include <linux/uidgid.h>
 
+#define backport_init_sym(fn) extern void backport_##fn(void);
+#define backport_init_call(fn) backport_##fn()
+
+#define backport_initcall(fn)			\
+	void backport_##fn(void)		\
+	{					\
+		fn();				\
+	}
+
+#undef core_initcall
+#undef late_initcall
+
+#define core_initcall	backport_initcall
+#define late_initcall	backport_initcall
+
 /*
  * The define overwriting module_init is based on the original module_init
  * which looks like this:
-- 
1.7.10.4

--
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