Received: by 10.223.185.111 with SMTP id b44csp990034wrg; Fri, 9 Mar 2018 18:36:11 -0800 (PST) X-Google-Smtp-Source: AG47ELsPJY6FVyy6u70jejvLGsjb1fmtYeQITF9xsieuHv2dahDrXYizgBUdqFD9F86TBkt8LMXo X-Received: by 2002:a17:902:bb81:: with SMTP id m1-v6mr613867pls.71.1520649370936; Fri, 09 Mar 2018 18:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520649370; cv=none; d=google.com; s=arc-20160816; b=vvi5FzGWhBmYc7wtQtdXzSBlm962AkYHBKVUVOBMmQWLL0zyve3Ya0yP3aqPv6oHNb atHnvGdZ1e6MbnBvAyCkFsjEboSnAYYymkrCbgnBDpJgoFUCpwC+pNkLB16vXA81Y0qO 8QNNajtxT/hiPI90ci37mgQdPLwDUZ5dNv9qguULexBavz8jflTSc00NusXIsyW6izdF s980Z0AxvK4HKOO9cbGGtwUOdVsEJeW7E5Cd+urJmZ91uF0qoqCIYZijt2v5bocf3AXd 5NQwukaR0QcMARgfNBtq2J9ozWHGlIYGfaK96mVngt1o1qoNoX4nTBYG4lAgjCIwF0FI A5lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:dkim-signature:arc-authentication-results; bh=eJBVWt0j/uGz7KKiPOWD0NtlqVAZ2f0hNbfnF+1OXXE=; b=fQLHnlUATPE/3OnMjDRqhty/QcMqVnFn4ws0E4Z3DhIkfnvmj0ArDJZn3KlHKiaeJW ewzzymSiHsCZOzIJwyfhLH6tJsbvg1tsFFHjx5i77mewFr3cw1pV1o3pAPQulj7597bo w3vm+6SoR0Xk8pA+p1V4PKMvagcR2LgzrfodwqhPGloUftKWQxnIQe7ONPW5UdZHBhpk jhgtv2ulwjhQbyQj2I/OQC9RThayR0r+qW3gC5t16ZP1hVJqN42D7z1iIj2mMSdQWsqd HggjffGla47uQXfzZ2mXNWxaNAvuIzP+YmZ/FXKfL7jMD5E02GhqULTHFyG56unEGHuu 8b4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=kECjX/8r; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=NDNLuNAz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si1906257pfs.116.2018.03.09.18.35.55; Fri, 09 Mar 2018 18:36:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=kECjX/8r; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=NDNLuNAz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932835AbeCJCfF (ORCPT + 99 others); Fri, 9 Mar 2018 21:35:05 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:32922 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbeCJCfB (ORCPT ); Fri, 9 Mar 2018 21:35:01 -0500 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2A2UJ3Y008573; Fri, 9 Mar 2018 18:34:31 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=eJBVWt0j/uGz7KKiPOWD0NtlqVAZ2f0hNbfnF+1OXXE=; b=kECjX/8rQ5oRw4nlrdT3KfUoIsXPoqAjIfGvor4UnItfuczb23067pgehRd3DcoLOMwe PjQ4xBDIjOMlDyvje/wnsAsNeQSHREKg0UTbKvdFBjmnF9dQM+BAD7zTrxwlAkJ5IFnU 2CARh9PwFWtek2HVDV/q8W4WAXYXCeBOlvM= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2gm3u50ed9-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 09 Mar 2018 18:34:30 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.32) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 9 Mar 2018 21:34:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=eJBVWt0j/uGz7KKiPOWD0NtlqVAZ2f0hNbfnF+1OXXE=; b=NDNLuNAzq3ppQMrfpRuEpfzAER1rljbwvghfIVB1OxNx8fB7UNEqavzYMHsLJT1tSJtGIFXhr5gWszlQw6X9Gv2xJGVX5Eoi8IddAr2y/ia89Eb5YG/2DFr9MM7v4qRo/0lrAJD/XJ9QtX5raRUjc4b0Z0qyBcLFO3ILX/OmA4s= Received: from [IPv6:2620:10d:c081:1131::12d1] (2620:10d:c090:180::1:7688) by BYAPR15MB2504.namprd15.prod.outlook.com (2603:10b6:a02:8e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Sat, 10 Mar 2018 02:34:22 +0000 Subject: Re: [PATCH net-next] modules: allow modprobe load regular elf binaries To: Linus Torvalds , David Miller References: <20180309.135724.452219538059491199.davem@davemloft.net> CC: Andy Lutomirski , Kees Cook , Alexei Starovoitov , Djalal Harouni , Al Viro , Daniel Borkmann , Greg Kroah-Hartman , "Luis R. Rodriguez" , Network Development , Linux Kernel Mailing List , kernel-team , Linux API From: Alexei Starovoitov Message-ID: <81b7599d-aab7-6cb6-7843-64510c8f6260@fb.com> Date: Fri, 9 Mar 2018 18:34:18 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:7688] X-ClientProxiedBy: DM5PR20CA0023.namprd20.prod.outlook.com (2603:10b6:3:93::33) To BYAPR15MB2504.namprd15.prod.outlook.com (2603:10b6:a02:8e::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3fc5968-45a0-4594-136b-08d5862f7039 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB2504; X-Microsoft-Exchange-Diagnostics: 1;BYAPR15MB2504;3:BPDnzAHOPyOlgqpQk3vDV1jDLipVZC+bt3YmO2mc7hgYlqqwGtTJ3+Wo1TTB8eueWtkDismyEdikpORSRe6kou9uv2ahLIiZUAXdHKpSakOB3mXEfw7XrA7ohb5Gw/0yrxi+T86a34MBr8QbOvhg5kNLtWtyiiLyFmYYRYizMTk5a0NOU/16gq63F7VLf7ybp58Bd+m/ue1mHh94dgrl5BIDe+0FwGORQH38yE8y4JwLyPWZNGeYGStUN4ztf8Ra;25:RtDmbgk8gAYy1V/RZJwGypbgR7XLzN4klZiLfoQGXQ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Ckc5fHIpDPeey9K+8jw7uWpVLnoHrEsYXbZn5k;4:hxuewny3gkgy4DVbJFblOl+2yhyBy4TOXdgQnr3XWVpdDMkZ4p1aU3rbXVX5ou0vIgJ1A7VyJCLHJWx9LFgpeexgpeSQtU2lfJLX1lzjRJ6lyIVSxO7LTw1pojX9SuJTXPBMsAYRGBvbhkR9y9ggz3YNZUt9uyanI77DU0wxR7CgBjDI8wKmZURyZTwDIIR64+z6DO/JBoNHLfkiOaAh8s/ratKwBVg1S6vLaluA0OICGDyv6hnsNY/oy5SoZ8Jm2DCzEumuA7nuvUuUPBHBXg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231220)(11241501184)(944501244)(52105095)(10201501046)(93006095)(93001095)(3002001)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:BYAPR15MB2504;BCL:0;PCL:0;RULEID:;SRVR:BYAPR15MB2504; X-Forefront-PRVS: 06070568C5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(52314003)(52116002)(8936002)(68736007)(93886005)(316002)(46003)(31686004)(110136005)(6486002)(81166006)(81156014)(58126008)(105586002)(8676002)(54906003)(76176011)(86362001)(106356001)(31696002)(53546011)(52396003)(23676004)(186003)(52146003)(2486003)(16526019)(305945005)(386003)(7736002)(478600001)(67846002)(59450400001)(7416002)(97736004)(6246003)(64126003)(2950100002)(6666003)(2906002)(1706002)(36756003)(65826007)(6116002)(5660300001)(230700001)(53936002)(4326008)(65806001)(47776003)(65956001)(50466002)(25786009)(39060400002)(229853002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB2504;H:[IPv6:2620:10d:c081:1131::12d1];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWUFQUjE1TUIyNTA0OzIzOnAvZEJRUGZWek9lWTYrWTQ1T0NYeitlVEpQ?= =?utf-8?B?YzNYbDEySGs1MktnbzB4NS9LWkFoVzMvYlY0azMvMGswb2FsS2hjZlNEMHps?= =?utf-8?B?YmMxdE05OFpnRmxrVWN0NjlwN2dQNUx6OWt1K0NOZGRNcEpZcDZyck4zQnZ1?= =?utf-8?B?WmZSVWVuK1VlbkQ3RGVsWmhUQTFqRHBDOHBxdEVpdkVXeVdZMW1nUXl0NFZT?= =?utf-8?B?N282SXROckFRbG1hQUNYYjF2eitZK1FCMXdjek5QNnJoL1llMXhGQlZpcWhj?= =?utf-8?B?MW1hZWJVRVFsWlRDQS94Rm5lYUNydThMZlZiSHM2aTFPUW9yQzVFWVNSem5u?= =?utf-8?B?VDNJeG9oNENabTNtVyswbG9kT1Rsanl2VVRSa2tDN2w3UDJWZVN6emprdGlQ?= =?utf-8?B?RWljYjBtWUZOWVk5bXB1U2ZsaGpsTXpEOUN0R2trNXFzejNMeDBCbFVYemdU?= =?utf-8?B?MHg0Zk5STUcrd2lsVEJFSEovdTBTcW81cHRsRHJzYzFtbWJycmU0ZkJ5emRX?= =?utf-8?B?bUFGYnc3MjhwS2VSZW9LS0VhLzdoRzQ4a0tzMnFabTAyWFZqdFlpTDBTbW90?= =?utf-8?B?cWVxM1ZiY3lYUlNDbnlzalA3eTYyY0tsZW5pZXFHK29FRUNQNmlaMEVxVmgr?= =?utf-8?B?aGRVaDZ0TnhPL1kwMDlSZHh2RWJUNERReGhGRE1UUzFSRHFhMjdtVXRlY3kz?= =?utf-8?B?VW5jTGg2cGluZDJzT1A0Vjk0UXZwcEk3YWxxM0xmRW5sOG1XQmhDYTlSRmZW?= =?utf-8?B?S2hwRURtTGxzSG9GRXZaSHovekk1alFwS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JW87RtsCacuMXwx+OO7jXGD+GSesmVCuHONDgKRwwQUrIdvtIK5X1NcoSvOxpxfEbGTNqck=;24:ndsHF0L5yVz0qvjBgpDQZp5ROboyIzMbVs7djTzlApuO2L9GG6hv0XO237XrI3c+ICBRloYUnRJCRapdgRzY9MzqosQpS1/4U+d5YhVFmhI=;7:8yziXjDlKQNQsD+RHoA7sTwWSsWJ3ucaSWOOvl/C1axv/GVeULcpJMmcDBD6NlxFoKYdkRM7gT4P/AdFVKNZUVIntgSyiaQlKgdVhaukQR5PzqrTk/bqeOANzfMbMkEYr2LdZU/UlFQ6oXqftl9dhi1TwhU9vSMP/Hq1DF3Uh6DQdkLpiX2zZV0CmDxoyZjeJ3zbKOvRKOjgjD7XijZDIzCdxJNcuVaU1qv22qAKTqK0LOugtrVe8iOHlyXrqL2T SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BYAPR15MB2504;20:pt/rz4mFyh+WqJLOxjcGoSUw6eAPw01m+aPkYB5ncoUMOfI2lisJIyFBKaZThJzNA95ajEfWyouROpojv68dKh6q3DZRRopjs8J0IHCwF6LGPURyo+P95SQsDu0ogVi/1DpHwVYANOMEt306iQynixtBCgi3DI2+KeNSAtEWyXs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2018 02:34:22.6229 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3fc5968-45a0-4594-136b-08d5862f7039 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2504 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-09_11:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/9/18 11:38 AM, Linus Torvalds wrote: > On Fri, Mar 9, 2018 at 11:12 AM, Linus Torvalds > wrote: >> >> How are you going to handle five processes doing the same setup concurrently? > > Side note: it's not just serialization. It's also "is it actually up > and running". > > The rule for "request_module()" (for a real module) has been that it > returns when the module is actually alive and active and have done > their initcalls. > > The UMH_WAIT_EXEC behavior (ignore the serialization - you could do > that in the caller) behavior doesn't actually have any semantics AT > ALL. It only means that you get the error returns from execve() > itself, so you know that the executable file actually existed and > parsed right enough to get started. > > But you don't actually have any reason to believe that it has *done* > anything, and started processing any requests. There's no reason > what-so-ever to believe that it has registered itself for any > asynchronous requests or anything like that. > > So in the real module case, you can do > > request_module("modulename"); > > and just start using whatever resource you just requested. So the > netfilter code literally does > > request_module("nft-chain-%u-%.*s", family, > nla_len(nla), (const char *)nla_data(nla)); > nfnl_lock(NFNL_SUBSYS_NFTABLES); > type = __nf_tables_chain_type_lookup(nla, family); > if (type != NULL) > return ERR_PTR(-EAGAIN); > > and doesn't even care about error handling for request_module() > itself, because it knows that either the module got loaded and is > ready, or something failed. And it needs to look that chain type up > anyway, so the failure is indicated by _that_. > > With a UMH_WAIT_EXEC? No. You have *nothing*. You know the thing > started, but it might have SIGSEGV'd immediately, and you have > absolutely no way of knowing, and absolutely no way of even figuring > it out. You can wait - forever - for something to bind to whatever > dynamic resource you're expecting. You'll just fundamentally never > know. > > You can try again, of course. Add a timeout, and try again in five > seconds or something. Maybe it will work then. Maybe it won't. You > won't have any way to know the _second_ time around either. Or the > third. Or... > > See why I say it has to be synchronous? > > If it's synchronous, you can actually do things like > > (a) maybe you only need a one-time thing, and don't have any state > ("load fixed tables, be done") and that's it. If the process returns > with no error code, you're all done, and you know it's fine. I agree that sync approach nicely fits this use case, but waiting for umh brings the whole set of suspend/resume issues that Luis explained earlier and if I understood his points that stuff is still not quite working right and he's planning a set of fixes. I really don't want the unknown timeline of fixes for 'waiting umh' to become a blocker for the bpfilter project ... > (b) maybe the process wants to start a listener daemon or something > like the traditional inetd model. It can open the socket, it can start > listening on it, and it can fork off a child and check it's status. It > can then do exit(0) if everything is fine, and now request_module() > returns. ... while for bpfilter use case we need a daemon and starting umh with UMH_WAIT_PROC which does fork() right away and parent does exit(0) is not any different from kernel pov than UMH_WAIT_EXEC. The kernel will be in the same situation described above. The forked process could have sigsegv quickly (right after telling parent that everything is ok) and kernel is waiting forever. That situation is what I was alluding to regarding that kernel<->umh need to have some sort of health check protocol. Regardless of how umh is invoked. I think what Andy proposing with kernel creating a pipe and giving it to umh can be used as this health check and means of 'load exclusion' to make sure that only one requested umh is running. Also I like Luis suggestion to use some other name than request_module() Something like: request_umh_module_sync("foo"); request_umh_module_nowait("foo"); in both cases the kernel would create a pipe, call umh either with UMH_WAIT_PROC or UMH_WAIT_EXEC and make sure that umh responds to first hello message. On success they would return a handle to that pipe and umh's pid. The further interaction between the kernel and umh will be via that pipe. If kernel->umh request times out the kernel side of bpfilter would sigkill the task and do request_umh() again. If that request_umh() fails there will be no retry, since at this point it's clear that given umh is broken. I'll implement only _nowait() version, since that's what we need for bpfilter and when suspend/resume issues are solved somebody who cares about usb driver in user mode can implement the _sync() variant. All that on top of tmpfs->file->execve_file hack that I still need feedback on.