Lucas De Marchi | bf89f76 | 2011-12-01 18:23:47 -0200 | [diff] [blame] | 1 | Features: |
Lucas De Marchi | 5e690c5 | 2011-12-16 02:02:58 -0200 | [diff] [blame] | 2 | ========= |
Lucas De Marchi | bf89f76 | 2011-12-01 18:23:47 -0200 | [diff] [blame] | 3 | |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 4 | * testsuite: |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 5 | - when fake delete_module() succeeds, remove its entry from /sys/module |
Lucas De Marchi | bf89f76 | 2011-12-01 18:23:47 -0200 | [diff] [blame] | 6 | |
Lucas De Marchi | c8c956b | 2012-06-11 12:00:19 -0300 | [diff] [blame] | 7 | * review API, maybe unify all of these getters: |
Gustavo Sverzut Barbieri | 674f859 | 2011-12-20 11:54:53 -0200 | [diff] [blame] | 8 | - kmod_module_version_get_symbol() |
| 9 | - kmod_module_version_get_crc() |
| 10 | - kmod_module_symbol_get_symbol() |
| 11 | - kmod_module_symbol_get_crc() |
| 12 | - kmod_module_dependency_symbol_get_symbol() |
| 13 | - kmod_module_dependency_symbol_get_crc() |
| 14 | - kmod_module_versions_free_list() |
| 15 | - kmod_module_symbols_free_list() |
Lucas De Marchi | c8c956b | 2012-06-11 12:00:19 -0300 | [diff] [blame] | 16 | - kmod_module_dependency_symbols_free_list( |
| 17 | |
| 18 | Main reason for this is that they need to open and read the module to get |
| 19 | this information. If module is compressed, that means uncompressing + |
| 20 | allocating necessary space + deallocating for each of them. depmod uses most |
| 21 | of these functions and in the end it uncompresses the module ~6x times more |
| 22 | than needed, which makes depmod very slow if compared to module-init-tools. |
| 23 | |
| 24 | We might want to either cache the elf file within kmod_module or create |
| 25 | another struct that the user ref()/unref(). |
Gustavo Sverzut Barbieri | 674f859 | 2011-12-20 11:54:53 -0200 | [diff] [blame] | 26 | |
Lucas De Marchi | a41b39f | 2012-01-20 13:04:43 -0200 | [diff] [blame] | 27 | * Stop using system() inside the library and use fork + exec instead |
| 28 | |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 29 | * config: configs that do not need to be matched by fnmatch() could be using a |
| 30 | vector instead of a list. This way we could search in it by calling |
| 31 | bsearch(). |
Lucas De Marchi | 9207df7 | 2012-02-14 21:57:35 -0200 | [diff] [blame] | 32 | |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 33 | * index: drop the "open(), seek(), read()" implementation and use another one |
| 34 | with mmap(). When lookup() is called and the file is not mmaped, mmap it. |
Lucas De Marchi | 5e690c5 | 2011-12-16 02:02:58 -0200 | [diff] [blame] | 35 | |
Lucas De Marchi | 9461893 | 2012-04-16 20:20:48 -0300 | [diff] [blame] | 36 | * Implement actions in kmod tool like 'insert', 'remove', 'info', etc |
| 37 | |
Lucas De Marchi | cc83364 | 2012-10-17 18:32:56 -0300 | [diff] [blame] | 38 | * Finish removal of "rmmod -w" when it's gone from kernel. |
| 39 | |
| 40 | * Deprecate not using KMOD_REMOVE_NOWAIT on libkmod. |
Lucas De Marchi | 8447b86 | 2012-08-30 14:10:47 -0300 | [diff] [blame] | 41 | |
Lucas De Marchi | 3af535c | 2011-12-27 17:32:55 -0200 | [diff] [blame] | 42 | Things to be added/removed in kernel (check what is really needed): |
Lucas De Marchi | 5e690c5 | 2011-12-16 02:02:58 -0200 | [diff] [blame] | 43 | =================================================================== |
| 44 | |
| 45 | * list of currently loaded modules |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 46 | - readdir() in /sys/modules: dir without a 'initstate' file means the |
| 47 | module is builtin. |
Lucas De Marchi | 5e690c5 | 2011-12-16 02:02:58 -0200 | [diff] [blame] | 48 | |
| 49 | * module's size should be available under /sys |
Lucas De Marchi | 758428a | 2012-01-16 15:56:17 -0200 | [diff] [blame] | 50 | - DONE in 3.3: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=cca3e707301862ca9b9327e6a732463982f8cd1b |
Lucas De Marchi | 5e690c5 | 2011-12-16 02:02:58 -0200 | [diff] [blame] | 51 | |
| 52 | * kill /proc/modules ? |
Lucas De Marchi | 758428a | 2012-01-16 15:56:17 -0200 | [diff] [blame] | 53 | - Unlikely, given other tools might depend on it |
Lucas De Marchi | 5a96c5f | 2012-01-01 05:47:17 -0200 | [diff] [blame] | 54 | |
| 55 | Things that are different from module-init-tools on purpose (!TODO) |
| 56 | =================================================================== |
| 57 | |
| 58 | modprobe |
| 59 | -------- |
| 60 | |
| 61 | * 'modprobe -l' was marked as deprecated and does not exist anymore |
| 62 | |
| 63 | * 'modprobe -t' is gone, together with 'modprobe -l' |
| 64 | |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 65 | * there's and additional '--remove-dependencies' flags to modprobe so we |
Lucas De Marchi | 5a96c5f | 2012-01-01 05:47:17 -0200 | [diff] [blame] | 66 | can remove modules depending on that one |
| 67 | |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 68 | * modprobe doesn't parse configuration files with names not ending in |
| 69 | '.alias' or '.conf'. modprobe used to warn about these files. |
Lucas De Marchi | 5a96c5f | 2012-01-01 05:47:17 -0200 | [diff] [blame] | 70 | |
Lucas De Marchi | 80e54cb | 2012-02-22 13:07:13 -0200 | [diff] [blame] | 71 | * modprobe doesn't parse 'config' and 'include' commands in configuration |
Lucas De Marchi | 0ad5dd0 | 2012-01-11 00:28:12 -0200 | [diff] [blame] | 72 | files. |
| 73 | |
Lucas De Marchi | f564394 | 2012-01-12 14:45:11 -0200 | [diff] [blame] | 74 | * modprobe from m-i-t does not honour softdeps for install commands. E.g.: |
| 75 | config: |
| 76 | |
| 77 | install bli "echo bli" |
| 78 | install bla "echo bla" |
| 79 | softdep bla pre: bli |
| 80 | |
| 81 | With m-i-t, the output of 'modprobe --show-depends bla' will be: |
| 82 | install "echo bla" |
| 83 | |
| 84 | While with kmod: |
| 85 | install "echo bli" |
| 86 | install "echo bla" |
| 87 | |
Lucas De Marchi | bc43496 | 2012-01-13 02:35:34 -0200 | [diff] [blame] | 88 | * kmod doesn't dump the configuration as is in the config files. Instead it |
| 89 | dumps the configuration as it was parsed. Therefore, comments and file names |
| 90 | are not dumped, but on the good side we know what the exact configuration |
| 91 | kmod is using. We did this because if we only want to know the entire content |
| 92 | of configuration files, it's enough to use find(1) in modprobe.d directories |
| 93 | |
Lucas De Marchi | 5a96c5f | 2012-01-01 05:47:17 -0200 | [diff] [blame] | 94 | depmod |
| 95 | ------ |
| 96 | |
| 97 | * there's no 'depmod -m' option: legacy modules.*map files are gone |
Lucas De Marchi | e85b673 | 2012-01-12 15:28:19 -0200 | [diff] [blame] | 98 | |
| 99 | lsmod |
| 100 | ----- |
| 101 | |
| 102 | * information is parsed from /sys instead of /proc/modules |