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-15-git-send-email-alexinbeijing@gmail.com>
Date:	Fri, 13 Mar 2015 20:14:48 +0200
From:	Alex Dowad <alexinbeijing@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Chen Liqin <liqin.linux@...il.com>, Lennox Wu <lennox.wu@...il.com>
Subject: [PATCH 25/32] score: copy_thread(): rename 'arg' argument to 'kthread_arg'

The 'arg' argument to copy_thread() is only ever used when forking a new
kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency
with do_fork() and other arch-specific implementations of copy_thread()).

Signed-off-by: Alex Dowad <alexinbeijing@...il.com>
---
 arch/score/kernel/process.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c
index a1519ad3..a72d15f 100644
--- a/arch/score/kernel/process.c
+++ b/arch/score/kernel/process.c
@@ -66,10 +66,10 @@ void exit_thread(void) {}
 void flush_thread(void) {}
 
 /*
- * set up the kernel stack and exception frames for a new process
+ * Copy architecture-specific thread state
  */
 int copy_thread(unsigned long clone_flags, unsigned long usp,
-		unsigned long arg, struct task_struct *p)
+		unsigned long kthread_arg, struct task_struct *p)
 {
 	struct thread_info *ti = task_thread_info(p);
 	struct pt_regs *childregs = task_pt_regs(p);
@@ -77,11 +77,13 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
 
 	p->thread.reg0 = (unsigned long) childregs;
 	if (unlikely(p->flags & PF_KTHREAD)) {
+		/* kernel thread */
 		memset(childregs, 0, sizeof(struct pt_regs));
 		p->thread.reg12 = usp;
-		p->thread.reg13 = arg;
+		p->thread.reg13 = kthread_arg;
 		p->thread.reg3 = (unsigned long) ret_from_kernel_thread;
 	} else {
+		/* user thread */
 		*childregs = *current_pt_regs();
 		childregs->regs[7] = 0;		/* Clear error flag */
 		childregs->regs[4] = 0;		/* Child gets zero as return value */
-- 
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