linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-parisc@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Brian Gerst <brgerst@gmail.com>,
	x86@kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] exec: remove compat_do_execve
Date: Fri, 26 Mar 2021 15:38:29 +0100	[thread overview]
Message-ID: <20210326143831.1550030-3-hch@lst.de> (raw)
In-Reply-To: <20210326143831.1550030-1-hch@lst.de>

Just call compat_do_execve instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/exec.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index b63fb020909075..06e07278b456fa 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1990,21 +1990,6 @@ static int do_execveat(int fd, struct filename *filename,
 }
 
 #ifdef CONFIG_COMPAT
-static int compat_do_execve(struct filename *filename,
-	const compat_uptr_t __user *__argv,
-	const compat_uptr_t __user *__envp)
-{
-	struct user_arg_ptr argv = {
-		.is_compat = true,
-		.ptr.compat = __argv,
-	};
-	struct user_arg_ptr envp = {
-		.is_compat = true,
-		.ptr.compat = __envp,
-	};
-	return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
-}
-
 static int compat_do_execveat(int fd, struct filename *filename,
 			      const compat_uptr_t __user *__argv,
 			      const compat_uptr_t __user *__envp,
@@ -2072,7 +2057,7 @@ COMPAT_SYSCALL_DEFINE3(execve, const char __user *, filename,
 	const compat_uptr_t __user *, argv,
 	const compat_uptr_t __user *, envp)
 {
-	return compat_do_execve(getname(filename), argv, envp);
+	return compat_do_execveat(AT_FDCWD, getname(filename), argv, envp, 0);
 }
 
 COMPAT_SYSCALL_DEFINE5(execveat, int, fd,
-- 
2.30.1


  parent reply	other threads:[~2021-03-26 14:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 14:38 cleanup compat exec handling Christoph Hellwig
2021-03-26 14:38 ` [PATCH 1/4] exec: remove do_execve Christoph Hellwig
2021-03-26 15:04   ` Arnd Bergmann
2021-03-26 14:38 ` Christoph Hellwig [this message]
2021-03-26 15:42   ` [PATCH 2/4] exec: remove compat_do_execve Andreas Schwab
2021-03-27 19:56   ` Sergei Shtylyov
2021-03-26 14:38 ` [PATCH 3/4] exec: simplify the compat syscall handling Christoph Hellwig
2021-03-26 15:02   ` Arnd Bergmann
2021-03-26 16:12   ` Al Viro
2021-03-26 16:44     ` David Laight
2021-03-26 21:22   ` Eric W. Biederman
2021-03-26 14:38 ` [PATCH 4/4] exec: move the call to getname_flags into do_execveat Christoph Hellwig
2021-03-26 15:12   ` Arnd Bergmann

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=20210326143831.1550030-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=arnd@arndb.de \
    --cc=brgerst@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mcgrof@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).