summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'baserock/tiagogomes/kmod-update' of ↵baserock/morphTiago Gomes2013-07-011-1/+1
|\ | | | | | | ssh://git.baserock.org/delta/kmod into baserock/morph
| * Disable building the manual pagesTiago Gomes2013-07-011-1/+1
| |
* | Revert "Merge remote-tracking branch 'origin/master' into baserock/morph"Tiago Gomes2013-07-01280-4421/+2260
| | | | | | | | | | This reverts commit 64e277a1bbe8ace86e159fb2d81e77629b9f9a42, reversing changes made to 47fddef72fdd6c0e6a192026b673305fb67dc361.
* | Revert "Disable building the manpages"Tiago Gomes2013-07-011-1/+1
| | | | | | | | | | | | This reverts commit a62b193df9fba04635e62e2fb29a0501866d0da0. Pushed by accident.
* | Disable building the manpagesTiago Gomes2013-07-011-1/+1
|/
* Merge remote-tracking branch 'origin/master' into baserock/morphTiago Gomes2013-07-01280-2260/+4421
|\
| * build-sys: do not allow --enable staticLucas De Marchi2013-06-061-0/+4
| | | | | | | | | | | | Do the same as done in systemd by Cristian Rodríguez <crrodriguez@opensuse.org>. We use private symbols, not namespaced. So don't pretend we support static linking.
| * Add travis-ci config fileLucas De Marchi2013-05-111-0/+17
| | | | | | | | Experiment with a build bot.
| * libkmod: Avoid calling syscall() with -1Jan Luebbe2013-05-111-0/+7
| | | | | | | | | | | | At least in qemu 1.4.1 for vexpress/arm-cortexa9, this resulted in an illegal instruction error. Solve that by returning an error when __NR_finit_module is -1.
| * Revert "missing: Don't call syscall() with syscallno == -1"Lucas De Marchi2013-05-111-6/+4
| | | | | | | | | | | | | | | | | | This reverts commit 38829712e5c411bc250aeae142fc6bf06e794d58. It fixes the problem, but it breaks the testsuite for those who don't have __NR_finit_module. The testsuite would have to make the same check. Instead, I'm reverting this change and I'm going to apply another patch from Jan Luebbe who got this right from the beginning.
| * Add document for exported enumsChengwei Yang2013-05-042-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several exported enums by libkmod without document, this patch mainly added documentation for below enums like the way kmod_resources be documented in. * kmod_index * kmod_remove * kmod_insert * kmod_probe * kmod_filter * kmod_module_initstate This is not the best way to document these exported enums, however, it's the simple way due to gtkdoc limits. It doesn't support export plain enum like below: see https://bugzilla.gnome.org/show_bug.cgi?id=657444 ---------8<-------head.h--------------8<----------- ... enum foo { ... }; ... ---------8<-------end of head.h-------8<----------- ---------8<-------source.c------------8<----------- ... /** * document for foo here */ ... typedef enum foo foo; ... ---------8<-------end of source.c-----8<----------
| * Several minor fixes for documentationChengwei Yang2013-05-042-9/+9
| |
| * modprobe: don't check refcount with remove commandJohannes Berg2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The modprobe.d (5) documentation for the "install" command states that you could specify install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred This makes some sense, but then the loading of "barney" is hidden from the user who did only "modprobe fred". Thus, it seems it should be possible to be able to unload the "fred" module with "modprobe -r fred" by configuring the "barney" module to also be removed: remove fred /sbin/rmmod barney fred (or similar.) Make this possible by not checking the refcount when an unload command was configured. Reported-by: David Spinadel <david.spinadel@intel.com>
| * missing: Don't call syscall() with syscallno == -1Lucas De Marchi2013-05-021-4/+6
| | | | | | | | | | Reported-by: Jean-Francis Roy <jeanfrancis@funtoo.org> Reported-by: Jan Luebbe <jlu@pengutronix.de>
| * Fix coding styleLucas De Marchi2013-04-301-2/+2
| | | | | | | | Either with space or without, not a mix of both.
| * TODO: Add some entriesLucas De Marchi2013-04-301-0/+6
| |
| * libkmod-index: Return early if readroot failedLucas De Marchi2013-04-232-2/+10
| |
| * libkmod-module: Don't pass NULL ctx to kmod_logLucas De Marchi2013-04-231-1/+1
| |
| * libkmod-module: Don't pass NULL pointer to memcpyLucas De Marchi2013-04-232-3/+9
| | | | | | | | | | When passing n=0, don't pass a NULL pointer, but instead pass anything else (like the pointer to the start of the string).
| * build-sys: Add AM_V_XSLT to rule creating man pagesLucas De Marchi2013-04-211-1/+5
| |
| * Add format attribute and fix issuesLucas De Marchi2013-04-215-9/+13
| | | | | | | | | | | | | | | | | | | | Add __attribute__((format)) to log_filep() and _show() functions, fixing the bugs they found in the source code. For functions that receive va_list instead of being variadic functions we put 0 in the last argument, so at least the string is checked and we get warnings of -Wformat-nonliteral type. So, it's better than adding a pragma here to shut up the warning.
| * static-nodes: Fix indentationLucas De Marchi2013-04-191-162/+170
| | | | | | | | | | kmod uses tab instead of spaces and tries to honour 80chr limit, when that doesn't worsen the readability.
| * static-nodes: tmpfiles - also create parents directories of device nodesTom Gundersen2013-04-191-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: c /dev/cpu/microcode 0600 - - - 10:184 c /dev/fuse 0600 - - - 10:229 c /dev/btrfs-control 0600 - - - 10:234 c /dev/loop-control 0600 - - - 10:237 c /dev/snd/timer 0600 - - - 116:33 After: d /dev/cpu 0755 - - - c /dev/cpu/microcode 0600 - - - 10:184 c /dev/fuse 0600 - - - 10:229 c /dev/btrfs-control 0600 - - - 10:234 c /dev/loop-control 0600 - - - 10:237 d /dev/snd 0755 - - - c /dev/snd/timer 0600 - - - 116:33
| * kmod: It's an error not to have modules.devnameLucas De Marchi2013-04-171-2/+3
| | | | | | | | | | | | | | | | | | | | This file is created by depmod even if there's no node. In this case it will be empty. Previously 'kmod static-nodes' was segfaulting due to passing in==NULL to fgets. Also show the error message with %m.
| * tools: add static-nodes toolTom Gundersen2013-04-164-1/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tool reads modules.devname from the current kernel directory and outputs the information. By default in a human-readable format, and optionally in machine-readable formats. For now only the tmpfiles.d(5) format is supported, but more could easily be added in the future if there is a need. This means nothing but kmod needs to reads the private files under /lib/modules/. In particular systemd-udevd can stop reading modules.devname. Tools that used to read /lib/modules/`uname -r`/modules.devname directly, can now move to reading 'kmod static-nodes devname'.
| * Use static assertions for sizeof checksLucas De Marchi2013-04-151-5/+5
| |
| * Use _Static_assertLucas De Marchi2013-04-151-29/+7
| | | | | | | | | | Both GCC and clang already supports C11's _Static_assert, so use it instead of defining our own macro.
| * testsuite: errno is a positive numberLucas De Marchi2013-04-121-1/+1
| |
| * TODO: update and reorderLucas De Marchi2013-04-091-11/+10
| |
| * kmod 13v13Lucas De Marchi2013-04-093-2/+24
| |
| * build-sys: Always enable parallel testsLucas De Marchi2013-04-091-1/+1
| | | | | | | | | | Automake < 1.13 doesn't enable parallel tests by default, so add it to our automake options.
| * testsuite: Fix checking __sysnoLucas De Marchi2013-04-091-5/+5
| | | | | | | | | | | | | | | | | | Use an if instead of a case statemente. If __NR_finit_module is not defined in system headers we define it to -1, causing a "duplicate case value" error. Yet, we don't want to actually call our finit_module() function if -1 is passed. This also fix errno being set with negative value.
| * testsuite: Wrap syscall() to get calls to finit_module()Lucas De Marchi2013-04-091-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we don't have finit_module() in libc (most likely because as of today glibc didn't add it yet), we end up using syscall(__NR_finit_module, ...). In this case we would not wrap the function in the testsuite and thus having some tests failing: TESTSUITE: ERR: could not insert module: Operation not permitted This implementation relies on the fact that this is the only caller of syscall(2), because we can't call libc's syscall(). There's an abort() in place to be future safe: as soon as we need more calls to syscall(), we can detect (and decide what to do). Now we have all tests passing in the testsuite again.
| * libkmod: Move finit_module() definition to missing.hLucas De Marchi2013-04-094-8/+19
| | | | | | | | | | | | | | | | | | Check for finit_module() and don't use our own static inline function if there's such function in libc (or another lib). In testsuite we need to unconditionally define HAVE_FINIT_MODULE because we want to override this function, and never use the static inline one in missing.h
| * libkmod: Add missing definitionsLucas De Marchi2013-04-094-2/+15
| | | | | | | | | | | | | | Depending on kernel header and simply not passing the flags in finit_module() if this header is not found is not good. Add a missing.h header in which stuff like this should be added.
| * libkmod: Use secure_getenv if availableCristian Rodríguez2013-04-043-1/+11
| | | | | | | | | | | | "The secure_getenv() function is intended for use in general-purpose libraries to avoid vulnerabilities that could occur if set-user-ID or set-group-ID programs accidentally trusted the environment."
| * modprobe: Fix assertion on --show-depends with bogus config fileLucas De Marchi2013-03-212-3/+6
| | | | | | | | | | | | | | | | | | Putting something like "alias psmouse deadbeef" is a hackish way to blacklist a module. While I don't encourage doing so, let's not explode if we fiund such config files. A small difference from the behavior of module-init-tools: we exit with 0 instead of 1.
| * testsuite: Add test to check if modprobe explodes on bogus configLucas De Marchi2013-03-2114-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Put this one /etc/modprobe.d/bougs.conf: alias psmouse deaddood `modprobe --show-depends --quiet psmouse` explodes in an assertion (unless you have a module named deaddood). Some people and initrd's use "alias psmouse off" to disable a module instead of blacklisting it or adding a install rule. Add a test with expected_fail == true before fixing this.
| * testsuite: Exit with success on signal if test has expected_fail=trueLucas De Marchi2013-03-211-1/+1
| |
| * libkmod-util: Add missing include fileLucas De Marchi2013-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | Fix compilation issue with musl-libc: CC libkmod/libkmod-list.lo In file included from libkmod/libkmod-private.h:183:0, from libkmod/libkmod-list.c:24: libkmod/libkmod-util.h:33:45: warning: 'struct stat' declared inside parameter list [enabled by default] libkmod/libkmod-util.h:33:45: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
| * rmmod: Teach rmmod about builtin modulesJosh Boyer2013-03-181-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Currently modprobe -r will fail if a module is built in and report that it is built in. rmmod calls the same function to determine state but doesn't handle the KMOD_MODULE_BUILTIN return code. This leads to confusing errors like this: libkmod: kmod_module_get_holders: could not open '/sys/module/loop/holders': No such file or directory Error: Module loop is in use Fix this so that it actually reports the correct problem to the user.
| * libkmod: fix address argument to mmap callsKees Cook2013-02-192-3/+4
| | | | | | | | The first argument to mmap should be "NULL" instead of "0".
| * testsuite: handle finit_moduleKees Cook2013-02-191-0/+24
| | | | | | | | This adds the finit_module logic to the testsuite.
| * libkmod: add finit_module logicKees Cook2013-02-194-0/+47
| | | | | | | | | | | | | | | | When a module is being loaded directly from disk (no compression, etc), pass the file descriptor to the new finit_module() syscall. If the finit_module syscall is exported by the kernel syscall headers, use it. Additionally, if the kernel's module.h file is available, map kmod flags to finit_module flags.
| * testsuite: Add modinfo test for module signaturesMichal Marek2013-01-174-1/+26
| |
| * libkmod: Return module signature information in kmod_module_get_info()Michal Marek2013-01-174-2/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the module is built with CONFIG_MODULE_SIG, add the the signer's name, hexadecimal key id and hash algorithm to the list returned in kmod_module_get_info(). The modinfo output then looks like this: filename: /home/mmarek/kmod/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha256.ko license: GPL description: Fourth Extended Filesystem author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others alias: ext3 alias: ext2 depends: mbcache,jbd2 intree: Y vermagic: 3.7.0 SMP mod_unload signer: Magrathea: Glacier signing key sig_key: E3:C8:FC:A7:3F:B3:1D:DE:84:81:EF:38:E3:4C:DE:4B:0C:FD:1B:F9 sig_hashalgo: sha256 The signature algorithm (RSA) and key identifier type (X509) are not displayed, because they are constant information for every signed module. But it would be trivial to add this. Note: No attempt is made at verifying the signature, I don't think that modinfo is the right tool for this.
| * libkmod-module: Do not free the list in kmod_module_info_appendMichal Marek2013-01-171-7/+8
| | | | | | | | In error case, just return NULL and let the caller free the list.
| * Update copyright noticesLucas De Marchi2013-01-1639-39/+39
| |
| * libkmod-module: Add helper for building the module info listMichal Marek2013-01-161-19/+22
| |
| * gitignore: ignore files generated by Automake's testsuiteLucas De Marchi2013-01-152-0/+21
| | | | | | | | These files are generated by Automake 1.13 when running the testsuite.