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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1426270496-26362-9-git-send-email-alexinbeijing@gmail.com>
Date:	Fri, 13 Mar 2015 20:14:42 +0200
From:	Alex Dowad <alexinbeijing@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	David Howells <dhowells@...hat.com>,
	Koichi Yasutake <yasutake.koichi@...panasonic.com>,
	linux-am33-list@...hat.com (moderated list:PANASONIC MN10300...)
Subject: [PATCH 19/32] mn10300: copy_thread(): rename 'ustk_size' argument to 'kthread_arg'

'ustk_size' is misleading, since this argument is never used for a user stack
size. Rather, it is an argument passed to the main function executed by a new
kernel thread. Therefore, rename it to 'kthread_arg'.

Signed-off-by: Alex Dowad <alexinbeijing@...il.com>
---
 arch/mn10300/kernel/process.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 3707da5..d08a9b1 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -137,11 +137,10 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
 }
 
 /*
- * set up the kernel stack for a new thread and copy arch-specific thread
- * control information
+ * Copy architecture-specific thread state
  */
 int copy_thread(unsigned long clone_flags,
-		unsigned long c_usp, unsigned long ustk_size,
+		unsigned long c_usp, unsigned long kthread_arg,
 		struct task_struct *p)
 {
 	struct thread_info *ti = task_thread_info(p);
@@ -164,14 +163,17 @@ int copy_thread(unsigned long clone_flags,
 	p->thread.usp	= c_usp;
 
 	if (unlikely(p->flags & PF_KTHREAD)) {
+		/* kernel thread */
 		memset(c_regs, 0, sizeof(struct pt_regs));
 		c_regs->a0 = c_usp; /* function */
-		c_regs->d0 = ustk_size; /* argument */
+		c_regs->d0 = kthread_arg;
 		local_save_flags(c_regs->epsw);
 		c_regs->epsw |= EPSW_IE | EPSW_IM_7;
 		p->thread.pc	= (unsigned long) ret_from_kernel_thread;
 		return 0;
 	}
+
+	/* user thread */
 	*c_regs = *current_pt_regs();
 	if (c_usp)
 		c_regs->sp = c_usp;
-- 
2.0.0.GIT

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