summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge Baserock morphology into current masterbaserock/danielsilverstone/update-to-v15-plusDaniel Silverstone2014-03-261-0/+23
|\
| * 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
| |\
| * | Add symlinks for the different command names (insmod, etc)Lars Wirzenius2013-06-271-1/+7
| | |
| * | kmod.morph: don't use xzRichard Maw2012-05-021-1/+1
| | | | | | | | | | | | | | | kmod can use xz to read lzma compressed modules, however kmod is needed in foundation, which doesn't have xz
| * | kmod.morph: install pkg-config in right placeRichard Maw2012-02-241-1/+1
| | |
| * | kmod.morph: remove man dir from makefileRichard Maw2012-02-241-1/+1
| | |
| * | kmod.morph: run autoreconf before configureRichard Maw2012-02-241-0/+1
| | |
| * | kmod.morph: addRichard Maw2012-02-241-0/+16
| | | | | | | | | | | | It has some hacks to get around not using gtk-doc
* | | build-sys: try harder to shut up compiler wrt strict-aliasingLucas De Marchi2014-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With -Wstrict-aliasing=2 we get the following warning: libkmod/libkmod-signature.c:124:20: note: in expansion of macro 'get_unaligned' sig_len = be32toh(get_unaligned(&modsig->sig_len)); However there's nothing wrong with it. modsig->sig_len is uint32_t and get_unaligned in this case returns uint32_t. There's notstrict aliasing violation.
* | | libkmod: Fix unaligned accessLucas De Marchi2014-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Jan Engelhardt: Program received signal SIGBUS, Bus error. [Switching to process 11100] 0x00035278 in kmod_module_signature_info (file=0x4eeb8, sig_info=0xffffc254) at libkmod/libkmod-signature.c:124 124 sig_len = be32toh(modsig->sig_len); (gdb) p modsig $1 = (const struct module_signature *) 0xf7dfe143 modsig->sig_len can be unaligned if modsig is unaligned, so the padding in the struct has no effect since we are mapping it to the mem buffer.
* | | build-sys: Remove -Werror from CFLAGSLucas De Marchi2014-03-242-2/+2
| | | | | | | | | | | | Just let the warnings be emmited, but don't fail on them.
* | | build-sys: Remove bogus line causing warningLucas De Marchi2014-03-241-1/+0
| | | | | | | | | | | | | | | | | | ./configure: line 14316: xyes: command not found We are not using have_manpages, so remove it.
* | | Add test for depmod using search dirs with same prefixLucas De Marchi2014-03-199-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test depmod with search dirs "foo" and "foobar". Previously to 49b33c1 ("depmod: do not allow partial matches with "search" directive") we were failing this test due to matching the prefix without checking if it's the full dir name. We are adding 2 tests here in order to catch the case we only pass the test due to processing the directories in a favourable order.
* | | depmod: do not allow partial matches with "search" directiveAnssi Hannula2014-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently e.g. "search foo foobar built-in" will cause unpredictable results if baz.ko is in both foo/ and foobar/, since "foo" in search may match both of those directories and the preferred module therefore depends on processing order. Fix the code to ensure that the match is performed on full pathname components only.
* | | Add test for simple search order in depmodLucas De Marchi2014-03-195-0/+29
| | |
* | | depmod: fix debug print parameter orderAnssi Hannula2014-03-191-1/+1
| | |
* | | libkmod-elf: Fix check by class in get_modversions()Lucas De Marchi2014-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 51c409b ("Cache the offset of crc") unintentinally changed the comparison "if (elf->class & KMOD_ELF_32)" to "if (elf->class == KMOD_ELF_32)". This has been reported by Serge Voilokov <serge0x76@gmail.com>: On Raspberry PI elf->class equals KMOD_ELF_32|KMOD_ELF_LSB so valid condition should be (elf->class & KMOD_ELF_32) instead of (elf->class == KMOD_ELF_32). This fixes "modprobe --dump-modversions" failing on 32b systems.
* | | testsuite: Fix uname() during glibc startupMichal Marek2014-03-061-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a specific configuration (chroot with the linux32 personality), the modprobe_install_cmd_loop test failed, because the bash process handling the install command segfaulted. The backtrace showed a uname() call during libpthread initialization, at which point the environ pointer hadn't been initialized yet: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x080c1591 in getenv (name=<optimized out>, name@entry=0xf775f850 "TESTSUITE_UNAME_R") at getenv.c:81 81 for (i = 0, len = strlen (name); environ[i]; i++) (gdb) bt #0 0x080c1591 in getenv (name=<optimized out>, name@entry=0xf775f850 "TESTSUITE_UNAME_R") at getenv.c:81 #1 0xf775f754 in uname (u=u@entry=0xff946350) at testsuite/uname.c:32 #2 0xf74ffc6c in is_smp_system () at ../nptl/sysdeps/unix/sysv/linux/i386/smp.h:39 #3 __pthread_initialize_minimal_internal () at nptl-init.c:460 #4 0xf74fe32c in _init () at ../sysdeps/i386/crti.S:74 #5 0x00000000 in ?? () (gdb) p environ $1 = (char **) 0x0 I don't know why it only happend in the chroot, but glibc can call its own functions and impose any restrictions before main() is started, so we have to adapt. Also, do not return error if there is an environment, but the environment variable is not found. If uname() is called by kmod, then the respective test will simply fail later. If it's something else calling uname(), then we do not want to disturb the program.
* | | man: use systemd as example instead of udevLucas De Marchi2014-03-061-3/+5
| | | | | | | | | | | | | | | | | | Nowadays udev doesn't create nodes in /dev anymore. This role is rather taken by systemd-tmpfiles on early boot so reference it generically as systemd.
* | | man: clarify the support to modules.dep fileLucas De Marchi2014-03-062-11/+11
| | |
* | | build-sys: Do not require xsltproc for installation of man pagesLucas De Marchi2014-03-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same reason as found in this commit to systemd: commit 4ca39b280fce3c60d2fdecbd478fd9bf7f9d3e64 Author: Mike Gilbert <floppym@gentoo.org> Date: Sun Feb 23 11:21:13 2014 -0500 configure: Do not require xsltproc for installation of man pages The release tarballs ship with pre-generated man pages, so we do not need xsltproc for a typical end-user build. Developers will probably have xsltproc anyway, but if not they will now encounter a build-time failure instead of an error in configure.
* | | build-sys: add small redirecting MakefilesLucas De Marchi2014-03-066-2/+47
| | | | | | | | | | | | | | | | | | | | | These redirecting makefiles simplifies compiling from some editors and when CWD is not the root of the source tree. This is similar to what was introduced in systemd in 340d89e ("build-sys: add small redirecting Makefiles to simplify compilation from within emacs")
* | | testsuite: add test for '.' correctly parsed in param's valueLucas De Marchi2014-03-063-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In kcmdline it's possible to have a dot in the param's value. The support for this was added in 66f3228 ("libkmod: Add support for '.' in module parameter on kcmdline") and is needed to correctly support some modules that depend on it. This test was added in order to make sure the commit aa87854 ("libkmod-config: Only match dot before '=' in /proc/cmdline") didn't break it. Although that commit message says it's allowing to match a dot before '=' it's actually enforcing the first part of the string to be always in the format "<module-name>.param". Dots after '=' are still correctly allowed.
* | | testsuite: add test to ignore unrelated strings in kcmdlineLucas De Marchi2014-03-063-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | Strings unrelated to modules and modprobe should be ignored and not appear in the output of "modprobe -c". This adds a test for the fix provided in aa87854 ("libkmod-config: Only match dot before '=' in /proc/cmdline").
* | | testsuite: give a more suitable description to testLucas De Marchi2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | We are not only checking if those options are correctly parsed from kcmdline, but if in fact they are being passed to the final (f)init_module call. This is why we use 'modprobe --show-depends' instead of the simpler 'modprobe -c'.
* | | testsuite: add test for kcmdline params with no valueLucas De Marchi2014-03-063-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use "modprobe -c" to dump the configuration. Since we configure our rootfs to have only a /proc/cmdline file, this should dump the knowledge we have from its parsed content. Test if <module>.option, without any value is correctly parsed, as fixed in commit 493dc65 ("libkmod: Fix getting param with no value from kcmdline")
* | | libkmod-config: Only match dot before '=' in /proc/cmdlineMichal Marek2014-03-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, we also parse strings like BOOT_IMAGE=/boot/vmlinuz-3.12.12-57.g5f654cf-default In practice, this is not a problem, because there is no module named BOOT_IMAGE=/boot/vmlinuz-3. It just disturbs in modprobe -c output.
* | | libkmod-config,depmod: Accept special files as configuration files, tooMichal Marek2014-03-052-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we can open it and read it, it's good enough for us. Otherwise, we cannot use -C /dev/null to skip the system configuration for instance: $ ./tools/modprobe -C /dev/null -c libkmod: ERROR libkmod/libkmod-config.c:821 conf_files_list: unsupported file mode /dev/null: 0x21b6 ...
* | | libkmod-module: Simplify kmod_module_insert_module()Michal Marek2014-03-051-17/+10
| | | | | | | | | | | | | | | Store the file and elf pointer in the kmod_module structure and have it freed together with the module.
* | | Add some tests for kernels without finit_module(2)Michal Marek2014-03-0523-0/+62
| | |
* | | testsuite: Do not provide finit_module(2) on older kernelsMichal Marek2014-03-051-0/+24
| | | | | | | | | | | | | | | If the test's uname -r is less that 3.8, return -ENOSYS from finit_module(), so that the fallback is tested.
* | | testsuite: Add test for modprobe --forceMichal Marek2014-03-0512-0/+31
| | | | | | | | | | | | | | | There is no check if the correct flags are passed to finit_module, but at least we cover the respective code path in kmod.
* | | testsuite: Check the list of loaded modules after a testMichal Marek2014-03-054-6/+199
| | | | | | | | | | | | | | | | | | Add a ->modules_loaded member to struct test, which is a comma-separated list of modules that should be present after the test finishes. Both missing and excess modules cause an error.
* | | Remove "rmmod -w" documentation and getopt entryStephen Kitt2014-01-262-18/+0
| | | | | | | | | | | | | | | This patch removes the cmdopts declaration and the documentation. They were leftover from the -w removal.
* | | man: insmod documentation fixLukas Berk2014-01-241-1/+1
| | | | | | | | | | | | | | | | | | Add comma between lsmod(8) and modinfo(8) Signed-off-by: Lukas Berk <lberk@redhat.com>
* | | Remove duplicate includesLucas De Marchi2014-01-211-1/+0
| | | | | | | | | | | | | | | Found by https://raw.github.com/karelzak/util-linux/master/tools/checkincludes.pl
* | | man: Change my contact email addressLucas De Marchi2014-01-029-9/+9
| | |
* | | kmod 16v16Lucas De Marchi2013-12-223-2/+4
| | |
* | | Use C11's noreturnLucas De Marchi2013-12-177-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | Also define noreturn w/o <stdnoreturn.h> and move it to macro.h instead of in the testsuite. Based on similar commit on systemd by Shawn Landden <shawn@churchofgit.com>.
* | | module: use _cleanup_free and remove useless call to free()Lucas De Marchi2013-11-181-9/+5
| | |
* | | file: use _cleanup_free_Lucas De Marchi2013-11-181-4/+4
| | |
* | | array: avoid duplicate code to reallocateLucas De Marchi2013-11-181-19/+19
| | |
* | | util: Be OOM-safe and use _cleanup_free_Lucas De Marchi2013-11-181-14/+25
| | |
* | | testsuite: add basic test for getline_wrappedLucas De Marchi2013-11-183-0/+43
| | |
* | | util: use _cleanup_free_ on path_make_absolute_cwd()Lucas De Marchi2013-11-181-7/+6
| | |