From: Max Filippov <jcmvbkbc@gmail.com>
To: Chris Zankel <chris@zankel.net>
Cc: linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org,
Marc Gauthier <marc@tensilica.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH 3/3] xtensa: switch to generic sys_execve()
Date: Wed, 24 Oct 2012 05:48:37 +0400 [thread overview]
Message-ID: <1351043317-21631-4-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1351043317-21631-1-git-send-email-jcmvbkbc@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
arch/xtensa/include/asm/syscall.h | 2 +-
arch/xtensa/include/asm/unistd.h | 1 +
arch/xtensa/include/uapi/asm/unistd.h | 2 +-
arch/xtensa/kernel/process.c | 25 -------------------------
4 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
index c1dacca..124aeee 100644
--- a/arch/xtensa/include/asm/syscall.h
+++ b/arch/xtensa/include/asm/syscall.h
@@ -10,7 +10,7 @@
struct pt_regs;
struct sigaction;
-asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
+asmlinkage long sys_execve(char*, char**, char**, struct pt_regs*);
asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
asmlinkage long xtensa_ptrace(long, long, long, long);
asmlinkage long xtensa_sigreturn(struct pt_regs*);
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
index 9ef1c31..e83e966 100644
--- a/arch/xtensa/include/asm/unistd.h
+++ b/arch/xtensa/include/asm/unistd.h
@@ -8,6 +8,7 @@
* Copyright (C) 2001 - 2005 Tensilica Inc.
*/
+#define __ARCH_WANT_SYS_EXECVE
#include <uapi/asm/unistd.h>
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h
index ac37eb4..c5d736f 100644
--- a/arch/xtensa/include/uapi/asm/unistd.h
+++ b/arch/xtensa/include/uapi/asm/unistd.h
@@ -269,7 +269,7 @@ __SYSCALL(115, sys_sendmmsg, 4)
#define __NR_clone 116
__SYSCALL(116, xtensa_clone, 5)
#define __NR_execve 117
-__SYSCALL(117, xtensa_execve, 3)
+__SYSCALL(117, sys_execve, 3)
#define __NR_exit 118
__SYSCALL(118, sys_exit, 1)
#define __NR_exit_group 119
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index fd538bb..58e50ff 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -350,28 +350,3 @@ long xtensa_clone(unsigned long clone_flags, unsigned long newsp,
newsp = regs->areg[1];
return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
}
-
-/*
- * xtensa_execve() executes a new program.
- */
-
-asmlinkage
-long xtensa_execve(const char __user *name,
- const char __user *const __user *argv,
- const char __user *const __user *envp,
- long a3, long a4, long a5,
- struct pt_regs *regs)
-{
- long error;
- struct filename *filename;
-
- filename = getname(name);
- error = PTR_ERR(filename);
- if (IS_ERR(filename))
- goto out;
- error = do_execve(filename->name, argv, envp, regs);
- putname(filename);
-out:
- return error;
-}
-
--
1.7.7.6
next prev parent reply other threads:[~2012-10-24 1:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 1:48 [PATCH 0/3] xtensa: conversion to generic kernel_thread and friends Max Filippov
2012-10-24 1:48 ` [PATCH 1/3] xtensa: switch to generic kernel_thread() Max Filippov
2012-10-24 1:48 ` [PATCH 2/3] xtensa: switch to generic kernel_execve() Max Filippov
2012-10-24 1:48 ` Max Filippov [this message]
2012-10-24 2:41 ` [PATCH 3/3] xtensa: switch to generic sys_execve() Al Viro
2012-10-24 9:16 ` Max Filippov
2012-10-24 14:01 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351043317-21631-4-git-send-email-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=chris@zankel.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=marc@tensilica.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.