Received: by 10.213.65.68 with SMTP id h4csp151443imn; Fri, 6 Apr 2018 18:05:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/0H1hLuOpnnItPFR75C9mREgLSANtQt8EXUUB+5DY2TE0o/rxV0E/gqPfigbqVPekEfWTr X-Received: by 2002:a17:902:6547:: with SMTP id d7-v6mr29624847pln.253.1523063101921; Fri, 06 Apr 2018 18:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523063101; cv=none; d=google.com; s=arc-20160816; b=MI44/C7JSAQtibGqjUf4FnTBTjvbqExT040mFsDvh4xmibzm5RS8nC0FAfV7XlYcTl LBFO5hKuvt/Ur43MU4W4sqHd4/7BH7Er8T9ocrVUjzdfsMAGQzrMMipmYCVTt8F+rCk6 /bpbAMGiZ9JvMOsBLgfC+DR7vpu1GqKcntEK8meuoT6Pdwg4tu1LYxcpE5lcVJ6Q13eQ LlSTTV4D35ddVNABMVJMvbcNI9SV5QACfyylkmCocyCuD6UkAB3SEMEjvzEshLTwElbF qJDOsIaHr+LPNghYmVgJqaELbMWEWpCeLLYkA6PYpl2XyO6N70Q/3aZglUAiBXEW5UWe wZaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=4Ez/rxmsvFilsi7MUvvVxusgt2bPEIgcIhthrxeuMlE=; b=VTP8YQURukqgdVT54h0M8QiMk2FF0VPREoa4hSpZf7qlggLDBiSBKljevNhsdakhMI piac1jXhYzfNW4dR0xFeWL8jW8RwDqoAGTIrDzIy3LcSUs6zsb596/KniLJHJEquaQ56 8VlxUXIFhQ2SXIlpS72sSVtEtGmzIfAPY//+T/78TzI129ZwELIjAk54/8+95GwwkHzc T7Tq6GARkMbzJDhqcPx1zWCkRC4yuVbkGEYheqKMq8y4JTDgDG9VUdD1fhDDXz9g9MDA kjb9gbQMmBJRWY0w0T/Dd6tPkjC9+cT9ZWFw5Gam8XWMVSlacVoOWnVNXH/CVasRtDMf PM5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WzWdPuAd; 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 g9si6700949pfh.403.2018.04.06.18.04.13; Fri, 06 Apr 2018 18:05:01 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WzWdPuAd; 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 S1752219AbeDGBAQ (ORCPT + 99 others); Fri, 6 Apr 2018 21:00:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:32930 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbeDGBAP (ORCPT ); Fri, 6 Apr 2018 21:00:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4Ez/rxmsvFilsi7MUvvVxusgt2bPEIgcIhthrxeuMlE=; b=WzWdPuAdo3RGOrp0RmFB/8Wbc ER3Df811SvS7P94WhbmolNfVupKENZXv8IeedHL+BJtOBuCvplJ9Q96yxjqdDo2gafSabBahy02v0 Uo9Gz/PJabVnPp0OT7LYQ1ERDWkPSSXJR63mKF5BW8q0AxjNVuqm6eu6NgxYkCmFVOS/oGu5ZDYP1 /cML1AuDlav5SlXZFG2XBdfZAeb7kR7acGTIlirDLpTC37AHDGWSIxuriTfueJLaDyEs6SQ3qeLIv zdkRZX288nOWwm3epMrUJ8zR0D+AWIygNbJG3WJzozw4sKX95URKE4tV7RYH8G9mlacVgVFvK/0Eh KfDSbqdbA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4cDD-0000pq-Fy; Sat, 07 Apr 2018 01:00:11 +0000 Subject: Re: Differences between builtins and modules To: Lucas De Marchi Cc: Harish Jenny K N , linux-modules , lkml , greg KH , jason.vas.dias@gmail.com References: <54EB4C83.2000500@suse.cz> From: Randy Dunlap Message-ID: <4502a7e5-930f-15b6-fbef-929df29d5ef0@infradead.org> Date: Fri, 6 Apr 2018 18:00:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/24/2015 05:02 PM, Lucas De Marchi wrote: > On Mon, Feb 23, 2015 at 12:51 PM, Michal Marek wrote: >> On 2015-02-23 15:30, Lucas De Marchi wrote: >>> This could be particularly bad if in a kernel version an option was >>> tristate and in a new version it changed to boolean. I'm not sure if >>> this is common to happen in kernel. Any code that did "modprobe >>> " would start to fail. >> >> I think it's quite uncommon (*) and also the use case for loading >> builtin modules is not that common. I can think of: >> 1) building the initramfs, to determine which *.ko files need to be >> copied to it. Since such tools are often updated for other reasons, >> it's not a big deal. >> 2) Hardcoded module names in things like softdep -- hopefully not that >> common either, plus the kernel-provided soft dependencies can be >> fixed together with the change. >> >> Until not so long ago, the kernel would return EINVAL if passed a >> non-existent (renamed, removed) module option to init_module, yet there >> were no attempts at preserving the module options for compatibility reasons. >> >> (*) I now did a quick search: >> $ git log -p origin/master --no-merges -- '*/Kconfig*' | grep -C3 '^- >> *tristate' | grep '^+ *bool' >> + bool "Intel P state control" >> + bool "Intel microcode patch loading support" >> + bool "AMD microcode patch loading support" >> + bool "STI text console" >> + bool "Enable DDC2 Support" >> + bool "Enable Console Acceleration" >> >> That's only 6 cases in the whole git history. Maybe there are a few more >> hidden outside the three-line context as part of larger edits, but I'm >> sure more modules have been *removed* entirely from the kernel over this >> period. > > thanks for looking in detail into this. > >> >> >>> My questions are: >>> 1) should we put *all* the "modules" in the builtin index? >> >> You mean all *.o files that do not end up in some *.ko? That won't work, >> because unlike module names, the names of object files are not global. > > I was actually meaning anything that can have a directory under > /sys/module/. I figure we can't easily know this. > >> Plus, there was IIRC an idea to teach lsmod to print builtin modules -- >> listing all *.o would make it rather useless. > > This was one of my ideas... to traverse /sys/module and give more > information than we actually output right now, including builtin > modules. However, given the fact that builtin modules only have an > entry in /sys/module if they have params and now that I'm aware of the > race between the creation of the directory and the initstate file, I'm > giving up on this idea for now. > >>> 2) should we actually check /sys/module/ to report a >>> module as builtin or just stop doing that and rely solely in the >>> index? Initially I'd like to do the opposite, but given the race in >>> deciding this I'm favoring the index. >> >> If the race between the creation of /sys/module/ and >> /sys/module//initstate is inevitable, then I'm afraid we >> have to rely on the index. > > So my current plan is to rely solely on modules.builtin to output to > modprobe that a module is builtin. So things like "modprobe vt" will > start to fail saying there's no vt module. Any objections here? > Hi, [sorry to resurrect such as old thread] Would someone please answer/reply to this (related) kernel bugzilla entry: https://bugzilla.kernel.org/show_bug.cgi?id=118661 or I could just close it? thanks, -- ~Randy