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: <1426270496-26362-18-git-send-email-alexinbeijing@gmail.com>
Date:	Fri, 13 Mar 2015 20:14:51 +0200
From:	Alex Dowad <alexinbeijing@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Chris Metcalf <cmetcalf@...hip.com>,
	Christoph Lameter <cl@...ux.com>,
	Joe Perches <joe@...ches.com>, Tejun Heo <tj@...nel.org>
Subject: [PATCH 28/32] tile: 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/tile/kernel/process.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c
index 48e5773..bff52e4 100644
--- a/arch/tile/kernel/process.c
+++ b/arch/tile/kernel/process.c
@@ -97,8 +97,11 @@ void arch_release_thread_info(struct thread_info *info)
 
 static void save_arch_state(struct thread_struct *t);
 
+/*
+ * Copy architecture-specific thread state
+ */
 int copy_thread(unsigned long clone_flags, unsigned long sp,
-		unsigned long arg, struct task_struct *p)
+		unsigned long kthread_arg, struct task_struct *p)
 {
 	struct pt_regs *childregs = task_pt_regs(p);
 	unsigned long ksp;
@@ -130,15 +133,15 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
 		memset(&callee_regs[2], 0,
 		       (CALLEE_SAVED_REGS_COUNT - 2) * sizeof(unsigned long));
 		callee_regs[0] = sp;   /* r30 = function */
-		callee_regs[1] = arg;  /* r31 = arg */
+		callee_regs[1] = kthread_arg; /* r31 = arg */
 		childregs->ex1 = PL_ICS_EX1(KERNEL_PL, 0);
 		p->thread.pc = (unsigned long) ret_from_kernel_thread;
 		return 0;
 	}
 
 	/*
-	 * Start new thread in ret_from_fork so it schedules properly
-	 * and then return from interrupt like the parent.
+	 * user thread: start in ret_from_fork so it schedules properly
+	 * and then returns from interrupt like the parent.
 	 */
 	p->thread.pc = (unsigned long) ret_from_fork;
 
-- 
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