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]
Date:	Sat, 5 May 2012 11:49:24 -0700
From:	tip-bot for Thomas Gleixner <tglx@...utronix.de>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...nel.org, jesper.nilsson@...s.com, schwidefsky@...ibm.com,
	cmetcalf@...era.com, chris@...kel.net, hskinnemoen@...il.com,
	linux@....linux.org.uk, ralf@...ux-mips.org, monstr@...str.eu,
	vapier@...too.org, heiko.carstens@...ibm.com, gxt@...c.pku.edu.cn,
	tglx@...utronix.de, linux-kernel@...r.kernel.org, hpa@...or.com,
	richard@....at, lethal@...ux-sh.org, msalter@...hat.com,
	davem@...emloft.net, liqin.chen@...plusct.com, dhowells@...hat.com,
	benh@...nel.crashing.org, geert@...ux-m68k.org, mattst88@...il.com,
	jejb@...isc-linux.org, takata@...ux-m32r.org, jonas@...thpole.se,
	ysato@...rs.sourceforge.jp, rkuo@...eaurora.org
Subject: [tip:smp/hotplug] init_task: Create generic init_task instance

Commit-ID:  a4a2eb490e38aaff61eafcb8cde6725ad1be22ab
Gitweb:     http://git.kernel.org/tip/a4a2eb490e38aaff61eafcb8cde6725ad1be22ab
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 3 May 2012 09:02:48 +0000
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 5 May 2012 13:00:21 +0200

init_task: Create generic init_task instance

All archs define init_task in the same way (except ia64, but there is
no particular reason why ia64 cannot use the common version). Create a
generic instance so all archs can be converted over.

The config switch is temporary and will be removed when all archs are
converted over.

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Chen Liqin <liqin.chen@...plusct.com>
Cc: Chris Metcalf <cmetcalf@...era.com>
Cc: Chris Zankel <chris@...kel.net>
Cc: David Howells <dhowells@...hat.com>
Cc: David S. Miller <davem@...emloft.net>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Guan Xuetao <gxt@...c.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@...il.com>
Cc: Hirokazu Takata <takata@...ux-m32r.org>
Cc: James E.J. Bottomley <jejb@...isc-linux.org>
Cc: Jesper Nilsson <jesper.nilsson@...s.com>
Cc: Jonas Bonn <jonas@...thpole.se>
Cc: Mark Salter <msalter@...hat.com>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Matt Turner <mattst88@...il.com>
Cc: Michal Simek <monstr@...str.eu>
Cc: Mike Frysinger <vapier@...too.org>
Cc: Paul Mundt <lethal@...ux-sh.org>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Richard Kuo <rkuo@...eaurora.org>
Cc: Richard Weinberger <richard@....at>
Cc: Russell King <linux@....linux.org.uk>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Link: http://lkml.kernel.org/r/20120503085034.092585287@linutronix.de
---
 arch/Kconfig                            |    3 +++
 init/Makefile                           |    1 +
 {arch/alpha/kernel => init}/init_task.c |   17 ++++++++++++-----
 kernel/sched/Makefile                   |    2 --
 4 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 4f0d0f7..2dd8fdd 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -148,6 +148,9 @@ config USE_GENERIC_SMP_HELPERS
 config GENERIC_SMP_IDLE_THREAD
        bool
 
+config HAVE_GENERIC_INIT_TASK
+       bool
+
 config HAVE_REGS_AND_STACK_ACCESS_API
 	bool
 	help
diff --git a/init/Makefile b/init/Makefile
index 0bf677a..c55eac9 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -9,6 +9,7 @@ else
 obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
 endif
 obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
+obj-$(CONFIG_HAVE_GENERIC_INIT_TASK) += init_task.o
 
 mounts-y			:= do_mounts.o
 mounts-$(CONFIG_BLK_DEV_RAM)	+= do_mounts_rd.o
diff --git a/arch/alpha/kernel/init_task.c b/init/init_task.c
similarity index 73%
copy from arch/alpha/kernel/init_task.c
copy to init/init_task.c
index 6f80ca4..8b2f399 100644
--- a/arch/alpha/kernel/init_task.c
+++ b/init/init_task.c
@@ -1,17 +1,24 @@
-#include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/init_task.h>
+#include <linux/export.h>
+#include <linux/mqueue.h>
 #include <linux/sched.h>
 #include <linux/init.h>
-#include <linux/init_task.h>
 #include <linux/fs.h>
-#include <linux/mqueue.h>
-#include <asm/uaccess.h>
+#include <linux/mm.h>
 
+#include <asm/pgtable.h>
+#include <asm/uaccess.h>
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+
+/* Initial task structure */
 struct task_struct init_task = INIT_TASK(init_task);
 EXPORT_SYMBOL(init_task);
 
+/*
+ * Initial thread structure. Alignment of this is handled by a special
+ * linker map entry.
+ */
 union thread_union init_thread_union __init_task_data =
 	{ INIT_THREAD_INFO(init_task) };
diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
index 9a7dd35..173ea52 100644
--- a/kernel/sched/Makefile
+++ b/kernel/sched/Makefile
@@ -16,5 +16,3 @@ obj-$(CONFIG_SMP) += cpupri.o
 obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
 obj-$(CONFIG_SCHEDSTATS) += stats.o
 obj-$(CONFIG_SCHED_DEBUG) += debug.o
-
-
--
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