]> git.ipfire.org Git - thirdparty/kmod.git/blob - TODO
TODO: system() should not be used inside a library
[thirdparty/kmod.git] / TODO
1 Features:
2 =========
3
4 * config: configs that do not need to be matched by fnmatch() could be using a
5 vector instead of a list. This way we could search in it by calling
6 bsearch().
7
8 * index: drop the "open(), seek(), read()" implementation and use another one
9 with mmap(). When lookup() is called and the file is not mmaped, mmap it.
10
11 * create test-mock library to be LD_PRELOAD'ed before running the binaries
12 so we're able to create unit tests
13
14 * review API, maybe unify all of these setters:
15 - kmod_module_version_get_symbol()
16 - kmod_module_version_get_crc()
17 - kmod_module_symbol_get_symbol()
18 - kmod_module_symbol_get_crc()
19 - kmod_module_dependency_symbol_get_symbol()
20 - kmod_module_dependency_symbol_get_crc()
21 - kmod_module_versions_free_list()
22 - kmod_module_symbols_free_list()
23 - kmod_module_dependency_symbols_free_list()
24
25 * unify code from modprobe and libkmod:
26 - remove kmod_module_probe_insert() and turn it into
27 kmod_module_probe_get_list(); this way modprobe can use it too
28
29 * provide modules.archive, a cache file with all modules compressed
30 and a fast access. It's like a tar.gz, but with each entry
31 compressed as opposed to the whole tar compressed, easy to pick
32 individual entries, that is, more like .gz.tar. As zlib compression
33 does not store the uncompressed file size, this could provide
34 it. The file format should be something like:
35 MAGIC-ID
36 DIRECTORY-ENTRY-SIZE
37 DIRECTORY (hash-like format, points to file offset and size)
38 ENTRIES (each is a compressed module)
39 Helper binary to:
40 kmod-archive list
41 kmod-archive add path.ko
42 kmod-archive rm path.ko
43 kmod-archive get path.ko
44 kmod-archive exists path.ko
45
46 * Stop using system() inside the library and use fork + exec instead
47
48 Known Bugs:
49 ===========
50
51
52 Things to be added/removed in kernel (check what is really needed):
53 ===================================================================
54
55 * list of currently loaded modules
56 - readdir() in /sys/modules: dirs without a 'initstate' file mean the
57 modules is builtin.
58
59 * module's size should be available under /sys
60 - DONE in 3.3: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=cca3e707301862ca9b9327e6a732463982f8cd1b
61
62 * kill /proc/modules ?
63 - Unlikely, given other tools might depend on it
64
65 Things that are different from module-init-tools on purpose (!TODO)
66 ===================================================================
67
68 modprobe
69 --------
70
71 * 'modprobe -l' was marked as deprecated and does not exist anymore
72
73 * 'modprobe -t' is gone, together with 'modprobe -l'
74
75 * there's and additional '--remove-dependencies' flags to kmod-modprobe so we
76 can remove modules depending on that one
77
78 * kmod-modprobe doesn't parse configuration files whose name don't end on
79 '.alias' or '.conf'. modprobe used to warn about these files.
80
81 * kmod-modprobe doesn't parse 'config' and 'include' commands in configuration
82 files.
83
84 * we don't use <module-dir>/modules.builtin{,.bin} indexes. Instead we rely on
85 module appearing on /sys/modules/* without a initstate file to determine if
86 it is builtin.
87
88 * modprobe from m-i-t does not honour softdeps for install commands. E.g.:
89 config:
90
91 install bli "echo bli"
92 install bla "echo bla"
93 softdep bla pre: bli
94
95 With m-i-t, the output of 'modprobe --show-depends bla' will be:
96 install "echo bla"
97
98 While with kmod:
99 install "echo bli"
100 install "echo bla"
101
102 * kmod doesn't dump the configuration as is in the config files. Instead it
103 dumps the configuration as it was parsed. Therefore, comments and file names
104 are not dumped, but on the good side we know what the exact configuration
105 kmod is using. We did this because if we only want to know the entire content
106 of configuration files, it's enough to use find(1) in modprobe.d directories
107
108 depmod
109 ------
110
111 * there's no 'depmod -m' option: legacy modules.*map files are gone
112
113 lsmod
114 -----
115
116 * information is parsed from /sys instead of /proc/modules