- provide-kernel_execve-on-all-architectures-mips-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     provide-kernel_execve-on-all-architectures mips fix

has been removed from the -mm tree.  Its filename is

     provide-kernel_execve-on-all-architectures-mips-fix.patch

This patch was dropped because it was folded into provide-kernel_execve-on-all-architectures.patch

------------------------------------------------------
Subject: provide-kernel_execve-on-all-architectures mips fix
From: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

Two bugs in the MIPS version of kernel_execve(); the inline asm which was
copying from _syscall3 macro was still using the #stringify operation, so
isn't even valid C.  It also didn't get the result return in case of errors
right - $a3 = 1 indicates an error in which case $v0 will contain the
positive error number.

Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/mips/kernel/syscall.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff -puN arch/mips/kernel/syscall.c~provide-kernel_execve-on-all-architectures-mips-fix arch/mips/kernel/syscall.c
--- a/arch/mips/kernel/syscall.c~provide-kernel_execve-on-all-architectures-mips-fix
+++ a/arch/mips/kernel/syscall.c
@@ -416,15 +416,20 @@ int kernel_execve(const char *filename, 
 	register unsigned long __a2 asm("$6") = (unsigned long) envp;
 	register unsigned long __a3 asm("$7");
 	unsigned long __v0;
-	__asm__ volatile (
-	".set\tnoreorder\n\t"
-	"li\t$2, %5\t\t\t# " #name "\n\t"
-	"syscall\n\t"
-	"move\t%0, $2\n\t"
-	".set\treorder"
+
+	__asm__ volatile ("					\n"
+	"	.set	noreorder				\n"
+	"	li	$2, %5		# __NR_execve		\n"
+	"	syscall						\n"
+	"	move	%0, $2					\n"
+	"	.set	reorder					\n"
 	: "=&r" (__v0), "=r" (__a3)
 	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_execve)
 	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24",
 	  "memory");
-	return __v0;
+
+	if (__a3 == 0)
+		return __v0;
+
+	return -__v0;
 }
_

Patches currently in -mm which might be from ralf@xxxxxxxxxxxxxx are

origin.patch
introduce-kernel_execve.patch
rename-the-provided-execve-functions-to-kernel_execve.patch
provide-kernel_execve-on-all-architectures.patch
provide-kernel_execve-on-all-architectures-mips-fix.patch
remove-the-use-of-_syscallx-macros-in-uml.patch
sh64-remove-the-use-of-kernel-syscalls.patch
remove-remaining-errno-and-__kernel_syscalls__-references.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux