Received: by 10.213.65.68 with SMTP id h4csp1036119imn; Thu, 22 Mar 2018 13:55:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELtI9+k+dqlzaKslregoohXNTgy31zzO4p1ECycl2UXyn9mJmhOdKopriR1cnn/p9Zm5prEz X-Received: by 10.167.130.151 with SMTP id s23mr2810997pfm.106.1521752133252; Thu, 22 Mar 2018 13:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521752133; cv=none; d=google.com; s=arc-20160816; b=V9SGVGuAFwwB/6VI5nz+fjj5rFFPpuNXnBkdzItrWH4TSpyKUV8P2PtD8HT6VivJoh dsSa8jZz6D2FE2E70hhbw0osNhOIh9ioN02CTR99jbOhAG800AqXp0B2WRvofe0nqqAq Uo3qmQBOvC4u/zO0GyY1+TbsmElReXw3ozQeTtTE9aRLjKQFJZUZ915Hv+xIZ1XzOHok whG7ntdQbwL7qK09OZhj/mP50ihd8ynQLao8rpaVGmfKZUBlOFX42ujGrxKJ3R/tldOl 4w0raf9NiAI65IH0bNe4WFd4HkP9fFh6AZQDHAd/VqVJvSowU5yBBpFxkU9ecNdTp7mr xBLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=R0YMys0B/70EEHMOv1r0m6QqAP7/SFtjc/K4RIs0DmM=; b=XMtlIfp7aOYCdjaWYE3ndsRiYjpK+0JTtlKAu1N8DPMe7f1DEwBKggt804tWgM5JIx 4Eo1QTwUIK+lGTW347K3jOaG1XvCp04XyoDiVe4quPp4Tk6OKn2XxddPHmGS6ujUQ+FG 3CKZKE76BAb2E5KyysCp/z1WsJ8Gc9AnaMadt/g404Ne6px2jt06cnrQXwWSLj195owx ufBfXKSsfAFGRhbQuR9tr5Kpr4u7Nawg7E80NK3VNTVN01DFr2XkVuKTawdt4OlryaK3 FgKjwuYDB/uqecqTJEv2Fk75+FjCsHyUmTUgOk2WRDhb57ASVO/x3PLIXgo16nxnpyi2 3X9w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t88si5620164pfg.342.2018.03.22.13.55.18; Thu, 22 Mar 2018 13:55:33 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751837AbeCVUyS (ORCPT + 99 others); Thu, 22 Mar 2018 16:54:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:41980 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595AbeCVUyP (ORCPT ); Thu, 22 Mar 2018 16:54:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9B36CAE70; Thu, 22 Mar 2018 20:54:13 +0000 (UTC) Date: Thu, 22 Mar 2018 20:54:13 +0000 From: "Luis R. Rodriguez" To: Alexei Starovoitov Cc: Jessica Yu , Linus Torvalds , Mimi Zohar , Djalal Harouni , David Miller , Andy Lutomirski , Kees Cook , Alexei Starovoitov , Al Viro , Daniel Borkmann , Greg Kroah-Hartman , Network Development , Linux Kernel Mailing List , kernel-team , Linux API , "Luis R. Rodriguez" , Michal Hocko , Hannes Reinecke , werner@suse.com Subject: Re: [PATCH net-next] modules: allow modprobe load regular elf binaries Message-ID: <20180322205413.GA30543@wotan.suse.de> References: <20180309.135724.452219538059491199.davem@davemloft.net> <81b7599d-aab7-6cb6-7843-64510c8f6260@fb.com> <20180310140843.GP4449@wotan.suse.de> <20180310151652.GV4449@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180310151652.GV4449@wotan.suse.de> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 10, 2018 at 03:16:52PM +0000, Luis R. Rodriguez wrote: > On Sat, Mar 10, 2018 at 02:08:43PM +0000, Luis R. Rodriguez wrote: > > The alternative to this would be a simple equivalent of try_then_request_module() > > for UMH modules: try_umhm_then_request_umh_module() or whatever. So just as I > > argued earlier over UMH limitations, this is not the end of the world for umh > > modules, and it doesn't mean you can't get *properly* add umh modules upstream, > > it would *just mean* we'd be perpetuating today's (IMHO) horrible and loose > > semantics. > > I was about to suggest that perhaps a try_umhm_then_request_umh_module() or > whatever should not be a macro -- but instead an actual routine, and we don't > export say the simple form to avoid non-deterministic uses of it from the > start... but the thing is *it'd have to be a macro* given that the *check* for > the module *has to be loose*, just as try_then_request_module()... > > *Ugh* gross. > > Another reason for me to want an actual deterministic clean proper solution > from the start. I just thought of another consideration which should be made here for the long term. Some init systems have a timeout for kmod workers, that is the userspace process which issues the modprobe call. That was very well intentioned, however it ended up being nonsense, so at least on SLE systemd we disable the timeout for kmod workers. What others do... is unclear to me. Upstream wise the timeout was increased considerably, however, *if* such timeout is in effect for users it has some implicit implications on the number of devices a driver could support: number_devices = systemd_timeout ------------------------------------- max known probe time for driver I've documented the logic to these conclusions [0]. It sounds like we *do* want a full sync wait mechanism, and as I noted I think we should fix the determinism aspect of it. Since no aliases will be supported for usermode modules this will be much easier to support, and I can volunteer to help with that. However given the above... if we're going to use request_module() API (or a really fixed deterministic version of it later) for usermode kernel modules, the limitation above still applies. Are these usermode modules doing all the handy work on init? Or can it be deferred once loaded? How much loading on init should a usermode module need? If we can ensure that these usermode modules don't take *any time at all* on their init *from the start*, it would be wonderful and we'd end up avoiding some really odd corner case issues later. [0] http://www.do-not-panic.com/2015/12/linux-asynchronous-probe.html Luis