Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3022598ybt; Mon, 29 Jun 2020 13:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBzOKx/I97CSS01eabuvtEw5P1iygLpv9ihxk465ti9zueKdTt6RfQIg5JyZtTKtjr1395 X-Received: by 2002:a50:e3c9:: with SMTP id c9mr20122308edm.90.1593461377420; Mon, 29 Jun 2020 13:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593461377; cv=none; d=google.com; s=arc-20160816; b=Dxz8VHtKV19qs3BRdpFNCj1lKhokxf2AYUArep2KmjLpzxVUKQ7OKWOYgzdxcqpiTg eQ6GviMkgV7jE8xmmR/d5ZI8y23tL3L8aBi9q+0v7+zbJ1DlOex83u/DbMZBdYjSKDvN UnaB1/DK2lOnvCO3Wyg1WZp6LyZB/AnK98o/2rScMYmOjMzksxishN5odns8GVMAv6iu e83D9ntREqeeJRaJrzBTU9j6m1Ypz3/o/t+CcNrZap3389TefHLj/Sld+0sGp6IJ+/Pi V1uOTEoF4am+wPw5ezL943SrI5LZmmyEOvvUZrHbHU+0s+xt2rl7F+HC6ESZU8KZhLLA f1jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from; bh=uqqhPdjRMZwBFTyBbquGSCfTktN3Dm+aj5/Q5OMgPTs=; b=g8Wn+I7ItkkyyisnkcgOkNAFummtiTjLjS1LL6fgyJ1YXIoBiITDupZC/ed8KdYenK 0epNZ6USnohBAmzohccMIGIW+m7etS/JDGtxaUnNmDv2p64VlkQ2eFl8W8GXmHCf+GZ6 4gjPdtRaHbkbt/+l8JBEKB2IzRGYCOQpQrKwTy2R4ng36+6gZ3hfirz9XtXzC/Io92Tg PDAOlxAEaSNv2RflYNnPA9dZbwaFsyOCpfMpj3fv2EGjX1vQV0hXLg/kYXSIUAdHlGil jwX7ouvYX16FwlLzhCsBOh35IxqxklsrIBGzNHZVz90PifxK+AZOvDZVKbJMxo5iYTsl gvzQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si351596ejy.71.2020.06.29.13.09.14; Mon, 29 Jun 2020 13:09:37 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388838AbgF2UIR (ORCPT + 99 others); Mon, 29 Jun 2020 16:08:17 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:36630 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732373AbgF2UIP (ORCPT ); Mon, 29 Jun 2020 16:08:15 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jq04c-0003ZM-3v; Mon, 29 Jun 2020 14:08:14 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jq04b-0000Ts-2E; Mon, 29 Jun 2020 14:08:13 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Cc: David Miller , Greg Kroah-Hartman , Tetsuo Handa , Alexei Starovoitov , Kees Cook , Andrew Morton , Alexei Starovoitov , Al Viro , bpf , linux-fsdevel , Daniel Borkmann , Jakub Kicinski , Masahiro Yamada , Gary Lin , Bruno Meneguele , LSM List , Casey Schaufler , Luis Chamberlain , Linus Torvalds References: <20200625095725.GA3303921@kroah.com> <778297d2-512a-8361-cf05-42d9379e6977@i-love.sakura.ne.jp> <20200625120725.GA3493334@kroah.com> <20200625.123437.2219826613137938086.davem@davemloft.net> <87pn9mgfc2.fsf_-_@x220.int.ebiederm.org> <87y2oac50p.fsf@x220.int.ebiederm.org> <87bll17ili.fsf_-_@x220.int.ebiederm.org> Date: Mon, 29 Jun 2020 15:03:41 -0500 In-Reply-To: <87bll17ili.fsf_-_@x220.int.ebiederm.org> (Eric W. Biederman's message of "Mon, 29 Jun 2020 14:55:05 -0500") Message-ID: <87r1tx4p2a.fsf_-_@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1jq04b-0000Ts-2E;;;mid=<87r1tx4p2a.fsf_-_@x220.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19IX0qdGDHj2d42J790qFSa6SiJQNy2ip4= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa07.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.8 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01,XMSlimDrugH autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 1.0 XMSlimDrugH Weight loss drug headers * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 0; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: ; sa07 0; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ; X-Spam-Relay-Country: X-Spam-Timing: total 424 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 9 (2.1%), b_tie_ro: 8 (1.8%), parse: 1.30 (0.3%), extract_message_metadata: 20 (4.7%), get_uri_detail_list: 1.95 (0.5%), tests_pri_-1000: 31 (7.2%), tests_pri_-950: 1.29 (0.3%), tests_pri_-900: 1.00 (0.2%), tests_pri_-90: 115 (27.0%), check_bayes: 112 (26.5%), b_tokenize: 14 (3.3%), b_tok_get_all: 6 (1.5%), b_comp_prob: 2.2 (0.5%), b_tok_touch_all: 86 (20.3%), b_finish: 0.91 (0.2%), tests_pri_0: 233 (55.1%), check_dkim_signature: 0.54 (0.1%), check_dkim_adsp: 2.2 (0.5%), poll_dns_idle: 0.62 (0.1%), tests_pri_10: 2.1 (0.5%), tests_pri_500: 7 (1.6%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH v2 09/15] umh: Stop calling do_execve_file X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the user mode driver code changed to not set subprocess_info.file there are no more users of subproces_info.file. Remove this field from struct subprocess_info and remove the only user in call_usermodehelper_exec_async that would call do_execve_file instead of do_execve if file was set. Link: https://lkml.kernel.org/r/877dvuf0i7.fsf_-_@x220.int.ebiederm.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: "Eric W. Biederman" --- include/linux/umh.h | 1 - kernel/umh.c | 10 +++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/linux/umh.h b/include/linux/umh.h index 73173c4a07e5..244aff638220 100644 --- a/include/linux/umh.h +++ b/include/linux/umh.h @@ -22,7 +22,6 @@ struct subprocess_info { const char *path; char **argv; char **envp; - struct file *file; int wait; int retval; int (*init)(struct subprocess_info *info, struct cred *new); diff --git a/kernel/umh.c b/kernel/umh.c index 3e4e453d45c8..6ca2096298b9 100644 --- a/kernel/umh.c +++ b/kernel/umh.c @@ -98,13 +98,9 @@ static int call_usermodehelper_exec_async(void *data) commit_creds(new); - if (sub_info->file) - retval = do_execve_file(sub_info->file, - sub_info->argv, sub_info->envp); - else - retval = do_execve(getname_kernel(sub_info->path), - (const char __user *const __user *)sub_info->argv, - (const char __user *const __user *)sub_info->envp); + retval = do_execve(getname_kernel(sub_info->path), + (const char __user *const __user *)sub_info->argv, + (const char __user *const __user *)sub_info->envp); out: sub_info->retval = retval; /* -- 2.25.0