From: Kirill Tkhai <tkhai@yandex.ru>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: mmarek@suse.cz, arnd@arndb.de, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, oleg@redhat.com,
grant.likely@secretlab.ca, ebiederm@xmission.com,
akpm@linux-foundation.org, ktkhai@parallels.com,
sam@ravnborg.org
Subject: Re: [PATCH 0/3] Implement /proc/built-in file similar to /proc/modules
Date: Sun, 14 Sep 2014 22:05:46 +0400 [thread overview]
Message-ID: <5415D8FA.8040305@yandex.ru> (raw)
In-Reply-To: <20140914173919.GA10059@kroah.com>
On 14.09.2014 21:39, Greg KH wrote:
> On Sun, Sep 14, 2014 at 09:31:58PM +0400, Kirill Tkhai wrote:
>> On 14.09.2014 19:38, Greg KH wrote:
>>> On Sun, Sep 14, 2014 at 02:18:13PM +0400, Kirill Tkhai wrote:
>>>> This series implements a possibility to show the list of built-in drivers
>>>> to userspace. The names of drivers will be the same as when they are modules.
>>>
>>> Have you looked at /sys/modules/ ? Doesn't that show what you want
>>> here?
>>
>> There are only the drivers in "/sys/module" which have parameters.
>> Drivers without parameters do not appear there.
>
> Ah, didn't realize that. Should be easy to fix though, if you really
> wanted to list the modules. Much better than a random proc file that
> you have to parse :)
But it looks like one file is better than many new directories.
Furthermore some utils already may consider /sys/module directory as
a directory where all drivers have parameters. Is it good if we add
new ones of different type there?
>>>> So, if your system has "loop" driver then it appears either in /proc/modules
>>>> or in /proc/built-in and userspace will be able to know about this.
>>>>
>>>> Now this is impossible. The only way to get kernel configuration is
>>>> /proc/config.gz, but CONFIG_* names can change from time to time. Module
>>>> names are more or less standardized.
>>>
>>> Module names aren't "standardized", we change them at times when needed,
>>> just like CONFIG_ names.
>>>
>>> What is your end goal here? As you say, config.gz is the real kernel
>>> configuration, just having a list of modules built in isn't going to
>>> help much in getting a working kernel config without it.
>>
>> It looks like userspace applications oriented on modules names rather
>> than on CONFIG_XXX parameters. /proc/config.gz is optional and userspace
>> applications can't base on it.
>>
>> For example, when I compile "loop" module built-in and "loop" is in
>> /etc/modules, init script warns about this module is not present and
>> can't be autoloaded. The script does not store CONFIG_XXX <-> module_xxx
>> conformity. And nobody stores it.
>>
>> When iptables wants extra functionality, it requests a module. Etc.
>>
>> Nobody is oriented on CONFIG_XXX parameters. It would be simple for
>> userspace to add a support of /proc/built-in analysing. It's very
>> similar to /proc/modules.
>
> Shouldn't userspace focus on the functionality a module provides, not
> the module name itself? Can't a test for the loop "module" just test to
> see if the loop control device is present? Same for iptables (there's
> modprobe rules for iptable modules I think...)
>
> In other words, don't focus on the module names, focus on the userspace
> function a module provides, there should always be a way to check that
> at run time (if not, then the module doesn't actually do much...)
Hm, I'm not sure that anybody stores CONFIG_XXX <-> module_xxx
conformity. Everybody bases on module name. If application is seeing
CONFIG_XXX=m, but the functionality, which it want's, is not available,
what it has to do? How should it convert CONFIG_XXX to module name?
So, many applications want module name instead of CONFIG_XXX, I believe.
Kirill
next prev parent reply other threads:[~2014-09-14 18:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 10:18 [PATCH 0/3] Implement /proc/built-in file similar to /proc/modules Kirill Tkhai
2014-09-14 10:18 ` [PATCH 1/3] kbuild: Make targets names tree-wide unique on x86 Kirill Tkhai
2014-09-14 15:57 ` Peter Foley
2014-09-14 18:09 ` Kirill Tkhai
2014-09-14 10:18 ` [PATCH 2/3] core: Save list of built-in drivers names Kirill Tkhai
2014-09-14 10:19 ` [PATCH 3/3] core: create /proc/built-in file to show the list of built-in drivers Kirill Tkhai
2014-09-14 15:38 ` [PATCH 0/3] Implement /proc/built-in file similar to /proc/modules Greg KH
2014-09-14 17:27 ` Oleg Nesterov
2014-09-14 17:57 ` Kirill Tkhai
2014-09-14 18:12 ` Richard Weinberger
2014-09-14 18:58 ` Kirill Tkhai
2014-09-14 20:00 ` Oleg Nesterov
2014-09-14 17:31 ` Kirill Tkhai
2014-09-14 17:39 ` Greg KH
2014-09-14 18:05 ` Kirill Tkhai [this message]
2014-09-14 18:13 ` Greg KH
2014-09-14 18:35 ` Kirill Tkhai
2014-09-14 18:56 ` Greg KH
2014-09-15 11:50 ` Kirill Tkhai
2014-09-16 15:40 ` Lucas De Marchi
2014-09-15 9:17 ` Michal Marek
2014-09-15 9:12 ` Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5415D8FA.8040305@yandex.ru \
--to=tkhai@yandex.ru \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=ebiederm@xmission.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=ktkhai@parallels.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=oleg@redhat.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.