Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1428843pxf; Fri, 26 Mar 2021 07:40:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3GCRG61MgxwdbzZzt1FlHY8GEogYQ4T61Cd/d5dGr3x1LkTIrmWoy0Wj0FeHI7AwL/qMK X-Received: by 2002:aa7:c9d1:: with SMTP id i17mr15055077edt.46.1616769654058; Fri, 26 Mar 2021 07:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616769654; cv=none; d=google.com; s=arc-20160816; b=pLajQFTQHpvHaj7EznkQRomNNLwIUyL1rLWjwLtEBJNY0WtEUrVQfY0eakg9iF1mzE 5tQc42coTMcl6gEK198u3EEZ+ssG2GktPBNSPbJbQXegH9I4RUfn41n3LZUpWqT3okmO igYYnOut+Xa/ogInKTGLfWuVNxl4sDT7muYXiEhwYE8BHU0ujwQzgW3UEQwNrOHvjkSX YO3smFjg03esZYT9QfJ6UZQiwLPqkgs7PPwphtHM66gHgEjpLUptJyuU43TJqWdabbR4 wlTiq2QkpyJ6H1RijK0gG/i/gTGQgnkgTtX27H0OUSgdmfiAev13QXzR/FwQmTpLowCI G9JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7gG07jJWdVdkveJTg0m/JRPJ+82hLCG/BeQINxDX6bU=; b=D2yGA+mqoU5WZxPtfpAqYNuX0p6o1CFG4w5/1ikq9q3IeJpnQDPey9W583RZpTSzuE DDgBDF2whTFjdOSheqqWQdtwmO5ULuDM9p3yfAiOafUeuw5GCdRjXVfltP9g2Kc6lkia Wlj8GzSyogKwHvMVVatBUWonrAb1a5d6xckfHU+Y11JCUzLa9NHNQCZkyMTmOCy15ZAG jxt4BUffT5nI9lyT3xYf7MmtehYBoCdzONs0XBUzMYK6YvpzcBjPCwxsSSYpiT7iiEpi FFImYhpRPFhGM7s42UOMTmks1oNcSAHGezlKG+FVuGEsCj/DYfw3JMLvm7TJgva13Q2W ycTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=D0aRvZfU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si6622593ejt.551.2021.03.26.07.40.31; Fri, 26 Mar 2021 07:40:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=D0aRvZfU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbhCZOj2 (ORCPT + 99 others); Fri, 26 Mar 2021 10:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbhCZOjN (ORCPT ); Fri, 26 Mar 2021 10:39:13 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AC91C0613AA; Fri, 26 Mar 2021 07:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=7gG07jJWdVdkveJTg0m/JRPJ+82hLCG/BeQINxDX6bU=; b=D0aRvZfUwo4S5aaCsJt561vjqM xaOTDqqsYCfGC25oUmioZexS8odCWf3uARtuUQGiuIKThTV5mYEfMPFHN/0Spsff+MrDYZv8TXLQP PJeY4TOdB437fk7H/dCXxvaEvdZDLk99kZt3pDcJikdEeR9gVlBl91iVG5Dr+RHOuRiG0rhSBAPpG ugsSvI20mRLSN7CXP1owGVW/FBNDmzXrR+Nnzxm7LU/k17Js3TAtzxuyr7aMymvve5r5N/hUX/2Th sfIPFFMKKFFVp85fcpS40i7HKn9o8s39mE8CRL/cYOw2j7B4emzTxY29I5IegFuL6rBdz15cpJqKU T4zrs2PA==; Received: from [213.208.157.35] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lPnbz-005U6v-WC; Fri, 26 Mar 2021 14:38:58 +0000 From: Christoph Hellwig To: "Eric W. Biederman" , Al Viro Cc: Arnd Bergmann , Brian Gerst , Luis Chamberlain , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] exec: remove compat_do_execve Date: Fri, 26 Mar 2021 15:38:29 +0100 Message-Id: <20210326143831.1550030-3-hch@lst.de> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210326143831.1550030-1-hch@lst.de> References: <20210326143831.1550030-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just call compat_do_execve instead. Signed-off-by: Christoph Hellwig --- 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