Lucas De Marchi [Tue, 9 Apr 2013 07:00:20 +0000 (04:00 -0300)]
libkmod: Add missing definitions
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.
Cristian Rodríguez [Mon, 11 Feb 2013 18:07:52 +0000 (15:07 -0300)]
libkmod: Use secure_getenv if available
"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."
Lucas De Marchi [Thu, 21 Mar 2013 05:33:25 +0000 (02:33 -0300)]
modprobe: Fix assertion on --show-depends with bogus config file
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.
Lucas De Marchi [Thu, 21 Mar 2013 05:24:07 +0000 (02:24 -0300)]
testsuite: Add test to check if modprobe explodes on bogus config
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.
Lucas De Marchi [Thu, 21 Mar 2013 05:22:15 +0000 (02:22 -0300)]
testsuite: Exit with success on signal if test has expected_fail=true
Lucas De Marchi [Tue, 19 Mar 2013 20:44:59 +0000 (17:44 -0300)]
libkmod-util: Add missing include file
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]
Josh Boyer [Fri, 15 Mar 2013 17:43:40 +0000 (13:43 -0400)]
rmmod: Teach rmmod about builtin modules
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.
Kees Cook [Mon, 18 Feb 2013 20:02:34 +0000 (12:02 -0800)]
libkmod: fix address argument to mmap calls
The first argument to mmap should be "NULL" instead of "0".
Kees Cook [Mon, 18 Feb 2013 20:02:33 +0000 (12:02 -0800)]
testsuite: handle finit_module
This adds the finit_module logic to the testsuite.
Kees Cook [Mon, 18 Feb 2013 20:02:32 +0000 (12:02 -0800)]
libkmod: add finit_module logic
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.
Michal Marek [Wed, 16 Jan 2013 20:04:00 +0000 (21:04 +0100)]
testsuite: Add modinfo test for module signatures
Michal Marek [Wed, 16 Jan 2013 08:52:01 +0000 (09:52 +0100)]
libkmod: Return module signature information in kmod_module_get_info()
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.
Michal Marek [Wed, 16 Jan 2013 16:51:57 +0000 (17:51 +0100)]
libkmod-module: Do not free the list in kmod_module_info_append
In error case, just return NULL and let the caller free the list.
Lucas De Marchi [Wed, 16 Jan 2013 13:27:21 +0000 (11:27 -0200)]
Update copyright notices
Michal Marek [Wed, 16 Jan 2013 09:18:17 +0000 (10:18 +0100)]
libkmod-module: Add helper for building the module info list
Lucas De Marchi [Tue, 15 Jan 2013 20:03:55 +0000 (18:03 -0200)]
gitignore: ignore files generated by Automake's testsuite
These files are generated by Automake 1.13 when running the testsuite.
Lucas De Marchi [Tue, 8 Jan 2013 01:08:46 +0000 (23:08 -0200)]
man: fix lib dir in which we look for config
Thanks to William Hubbs <w.d.hubbs@gmail.com> for spotting the bug.
Andrey Mazo [Wed, 12 Dec 2012 12:39:18 +0000 (16:39 +0400)]
depmod: fix builtin symbols resolution when the prefix symbol is set
When the prefix symbol is set, take it into account while adding symbols
from System.map file by skipping it before "__ksymtab_" comparison.
Also, prevent inserted fake symbols (like "__this_module") from being
wrongly truncated from beginning.
Andrey Mazo [Wed, 12 Dec 2012 12:36:58 +0000 (16:36 +0400)]
depmod: --symbol-prefix actually requires an argument
-P requires and uses an argument but its long counterpart --symbol-prefix does not:
depmod: option '--symbol-prefix' doesn't allow an argument
Lucas De Marchi [Wed, 5 Dec 2012 03:39:17 +0000 (01:39 -0200)]
kmod 12
Lucas De Marchi [Wed, 28 Nov 2012 16:26:23 +0000 (14:26 -0200)]
depmod: fix checking file extension
In depfile_up_to_date_dir() we need to check if name has a kmod
extension. "path" variable there will be the directory name, which
doesn't contain an extension.
Without this, "depmod -A" returns that the modules.dep is up to date,
even if it isn't.
In depmod_modules_search_file() it's pointless to compare the basename,
so pass only the name to be checked.
Lucas De Marchi [Wed, 28 Nov 2012 16:25:50 +0000 (14:25 -0200)]
Use bool instead of int
Also change the last field initializer in array to be empty.
Aleksey Makarov [Wed, 28 Nov 2012 03:44:00 +0000 (10:44 +0700)]
fix is_module_filename()
modinfo fails if there is a ".ko" substring in the path to the module
Lucas De Marchi [Wed, 21 Nov 2012 22:17:25 +0000 (20:17 -0200)]
libkmod-module: mangle the section header, not the section
When we are told to remove the "__versions" section we were mangling
that section instead of tweaking the SHF_ALLOC flag in its header.
Lucas De Marchi [Wed, 21 Nov 2012 20:34:50 +0000 (18:34 -0200)]
libkmod-module: Remove key+value vermagic from .modinfo section
When told to force load a module, we were removing only the value of
vermagic instead of the complete entry.
Philippe De Swert (philippe.deswert@jollamobile.com) sent a patch that
was additionally mangling also the last two chars of the key
("vermagic="). Instead of creating an invalid entry in .modinfo section
like this, this patch removes the complete entry, key + value, by
zeroing the entire string.
Much thanks to Philippe who found the issue and pointed to the fix.
Lucas De Marchi [Fri, 16 Nov 2012 14:05:42 +0000 (12:05 -0200)]
depmod: fix asserting mod->kmod == NULL
If we are replacing a lower priority module (due to its location), we
already created a kmod_module, but didn't open the file for reading its
symbols. This means mod->kmod won't be NULL, and this is just ok. Since
all the functions freeing stuff below the previous assert already takes
NULL into consideration, it's safe to just unref mod->kmod and let the
right thing happens.
Lucas De Marchi [Fri, 16 Nov 2012 13:35:30 +0000 (11:35 -0200)]
depmod: fix hash lookup by relpath instead of uncrelpath
We index modules in depmod by it's uncompressed relative path, not
relative path. We didn't notice this bug before since this function is
only triggered if we release a module to be replaced by one of higher
priority.
Also fix a leftover log message referring to relpath instead of
uncrelpath.
Lucas De Marchi [Thu, 8 Nov 2012 04:30:21 +0000 (02:30 -0200)]
kmod 11
Lucas De Marchi [Thu, 8 Nov 2012 04:01:59 +0000 (02:01 -0200)]
TODO: remove completed action
Lucas De Marchi [Tue, 6 Nov 2012 21:20:09 +0000 (19:20 -0200)]
tools: use program_invocation_short_name provided by libc
Thanks to Dave Reisner for pointing this out.
Lucas De Marchi [Tue, 6 Nov 2012 21:06:11 +0000 (19:06 -0200)]
tools: staticize functions that are now only used in log.c
Lucas De Marchi [Tue, 6 Nov 2012 21:01:59 +0000 (19:01 -0200)]
tools: share function for logging
Lucas De Marchi [Tue, 6 Nov 2012 20:26:34 +0000 (18:26 -0200)]
tools: share setting up libkmod log
This also fixes a bug in "e6996c5 rmmod: route all messages to syslog if
told to" in which "+ verbose" was removed. Instead of letting verbose
add to kmod_get_log_priority(), let it be similar to the other programs
instead.
Lucas De Marchi [Tue, 6 Nov 2012 20:04:09 +0000 (18:04 -0200)]
tools: use a single function for logging libkmod output
Lucas De Marchi [Tue, 6 Nov 2012 19:32:41 +0000 (17:32 -0200)]
tools: make usage() messages go to stdout rather than stderr
When user supplied --help/-h, program should output to stdout the usage,
not to stderr. It's the expected behavior, what the user asked for,
not something to log or an error.
Lucas De Marchi [Tue, 6 Nov 2012 19:08:43 +0000 (17:08 -0200)]
tools: share function to convert prio to string
No change is expected in the final binary since right now only an inline
function is shared. Later we expect to share more code.
Lucas De Marchi [Tue, 6 Nov 2012 18:54:17 +0000 (16:54 -0200)]
tools: share getting program name from argv for all tools
Lucas De Marchi [Mon, 5 Nov 2012 20:32:05 +0000 (18:32 -0200)]
rmmod: route all messages to syslog if told to
Lucas De Marchi [Mon, 5 Nov 2012 19:51:32 +0000 (17:51 -0200)]
rmmod: prefer ERR over plain fprintf
Lucas De Marchi [Mon, 5 Nov 2012 19:58:57 +0000 (17:58 -0200)]
modinfo: prefer ERR over plain fprintf
Lucas De Marchi [Mon, 5 Nov 2012 17:08:54 +0000 (15:08 -0200)]
insmod: prefer ERR over plain fprintf
Lucas De Marchi [Mon, 5 Nov 2012 04:07:09 +0000 (02:07 -0200)]
depmod: add depmod prefix to log messages
Lucas De Marchi [Mon, 5 Nov 2012 04:06:38 +0000 (02:06 -0200)]
depmod: remove inline from _log
Lucas De Marchi [Mon, 5 Nov 2012 04:04:44 +0000 (02:04 -0200)]
TODO: update file with tasks
Lucas De Marchi [Mon, 5 Nov 2012 04:01:06 +0000 (02:01 -0200)]
depmod: prefer ERR and WRN over plain fprintf
Lucas De Marchi [Thu, 1 Nov 2012 15:02:10 +0000 (13:02 -0200)]
modprobe: use ERR() instead of fprintf(stderr, ...)
Lucas De Marchi [Thu, 1 Nov 2012 14:45:23 +0000 (12:45 -0200)]
modprobe: prefix log messages to stderr with modprobe
Lucas De Marchi [Thu, 1 Nov 2012 14:39:18 +0000 (12:39 -0200)]
modprobe: move log function
Lucas De Marchi [Thu, 1 Nov 2012 14:24:58 +0000 (12:24 -0200)]
modprobe: prefix libkmod messages to stderr with modprobe:
When we are logging to stderr we are previously relying on libkmod
sending it to the default location in case we are not asked to log to
syslog. The problem is that modprobe may be used in scripts that don't
want to log to syslog (since they are not daemons, like scripts to
generate initrd) and then it's difficult to know where the message comes
from.
This patch treats only the messages coming from libkmod.
Lucas De Marchi [Thu, 1 Nov 2012 00:00:40 +0000 (22:00 -0200)]
modprobe: use prio_to_str() helper
Lucas De Marchi [Wed, 31 Oct 2012 23:29:54 +0000 (21:29 -0200)]
modprobe: exit in one place
Lucas De Marchi [Tue, 30 Oct 2012 05:46:12 +0000 (03:46 -0200)]
depmod: unref kmod_module once we don't need it anymore
Once we read all we need from a module, unref it so any resource taken
by it (including the mmap to access the file in libkmod) will be
dropped. This drastically reduces the number of open file descriptors
and also the memory needed, with no performance penalties. Rather,
there's a small speedup of ~2.6%.
Running depmod in a laptop with 2973 modules and comparing the number of
open file descriptors for kmod-10, before and after the last patches to
depmod (
caaf438cb681c5b5b5b3c32e5b6bd12e96993dd7 and HEAD) we have:
Before: 2980 simultaneously open fds
After: 7 simultaneously open fds
kmod-10: 7 simultaneously open fds
So now we have the speedup of caching the file in kmod_module without
the drawback of increasing the number of open file descriptors.
Lucas De Marchi [Tue, 30 Oct 2012 06:08:54 +0000 (04:08 -0200)]
depmod: use our copy of modname instead of calling libkmod
In depmod_module_add() we already called kmod_module_get_name() and
copied the string to our struct. Use it instead of calling again and
again the libkmod function.
Lucas De Marchi [Tue, 30 Oct 2012 05:16:10 +0000 (03:16 -0200)]
depmod: cache dependency_symbol list in struct mod
The overall goal is to coalesce the accesses to a file that is the
backend of a module. This commit addresses the calls to
kmod_module_get_get_dependency_symbols(). Calling it earlier, while we
are iterating the modules allows us to free the struct kmod of each
module much sooner. We are still not freeing it since there are other
places that must be refactored first.
There's a performance penalty of ~2.5% from previous commit.
Lucas De Marchi [Tue, 30 Oct 2012 05:16:10 +0000 (03:16 -0200)]
depmod: cache info_list in struct mod
The overall goal is to coalesce the accesses to a file that is the
backend of a module. This commit addresses the calls to
kmod_module_get_info(). Calling it earlier, while we are iterating the
modules allows us to free the struct kmod of each module much sooner. We
are still not freeing it since there are other places that must be
refactored first.
A nice side effect is that this commit reduces in ~33% the calls to
malloc(), giving a speedup of ~6% for cold caches (reproduced on only 1
laptop).
Lucas De Marchi [Tue, 30 Oct 2012 04:32:48 +0000 (02:32 -0200)]
depmod: do not create a hole in struct depmod
Lucas De Marchi [Tue, 23 Oct 2012 12:45:10 +0000 (10:45 -0200)]
build-sys: use AS_IF autoconf macro
Just for consistency with the rest.
Sami Kerola [Mon, 22 Oct 2012 17:40:02 +0000 (18:40 +0100)]
build-sys: require xsltproc when manpages are enabled
Before this commit the build system failed at late state with
non-helpful message when xsltproc was not available.
Making all in man
GEN depmod.d.5
/bin/sh: --nonet: command not found
make[2]: *** [depmod.d.5] Error 127
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Lucas De Marchi [Thu, 18 Oct 2012 04:36:33 +0000 (01:36 -0300)]
libkmod: cache open file for later access
If we are accessing several times the modules and reading some sections
by sucessive calls to the functions below, we are incurring in a penalty
of having to open, parse the header and close the file. For each
function.
- kmod_module_get_info()
- kmod_module_get_versions()
- kmod_module_get_symbols()
- kmod_module_get_dependency_symbols()
These functions are particularly important to depmod. It calls all of
them, for each module. Moreover there's a huge bottleneck in the open
operation if we are using compression. Every time we open the module we
need to uncompress the file and after getting the information we need we
discard the result. This is clearly shown by profiling depmod with perf
(record + report), using compressed modules:
64.07% depmod libz.so.1.2.7 [.] 0x00000000000074b8 ◆
18.18% depmod libz.so.1.2.7 [.] crc32 ▒
2.42% depmod libz.so.1.2.7 [.] inflate ▒
1.17% depmod libc-2.16.so [.] __memcpy_ssse3_back ▒
0.96% depmod [kernel.kallsyms] [k] copy_user_generic_string ▒
0.89% depmod libc-2.16.so [.] __strcmp_sse42 ▒
0.82% depmod [kernel.kallsyms] [k] hrtimer_interrupt ▒
0.77% depmod libc-2.16.so [.] _int_malloc ▒
0.44% depmod kmod-nolib [.] kmod_elf_get_strings ▒
0.41% depmod kmod-nolib [.] kmod_elf_get_dependency_symbols ▒
0.37% depmod kmod-nolib [.] kmod_elf_get_section ▒
0.36% depmod kmod-nolib [.] kmod_elf_get_symbols
...
Average of running depmod 5 times, dropping caches between them, in a
slow spinning disk:
Before: 12.25 +- 0.20
After: 8.20 +- 0.21
m-i-t: 9.62 +- 0.27
So this patch leads to an improvement of ~33% over unpatched version,
ending up with 15% speedup over module-init-tools.
Lucas De Marchi [Wed, 17 Oct 2012 21:32:56 +0000 (18:32 -0300)]
rmmod: Deprecate --wait option
Remove --wait from usage() and give a message + sleep(10) if user is in
fact using it.
Leandro Pereira [Fri, 12 Oct 2012 15:28:56 +0000 (12:28 -0300)]
libkmod-hash: Plug possible memory leak when free_value is defined
Although the hash table implementation allows passing a callback function
to free a value when it is removed from the hash table, hash_del() wasn't
freeing it if it was provided. Now it does.
As a bonus, it now checks if the callback is set in hash_add() as well.
Lucas De Marchi [Mon, 8 Oct 2012 22:04:16 +0000 (19:04 -0300)]
libkmod: Add support for '.' in module parameter on kcmdline
Otherwise we fail to parse arguments in kernel command line like
testmodule.testparam=1.5G
Suggested-by: Selim T. Erdogan <selim@alumni.cs.utexas.edu>
Lucas De Marchi [Thu, 4 Oct 2012 04:08:13 +0000 (01:08 -0300)]
testsuite: add depmod test for modules.alias
Check if modules.alias is correctly generated from modules.order if we
have compressed modules.
Lucas De Marchi [Thu, 4 Oct 2012 03:21:52 +0000 (00:21 -0300)]
testsuite: allow to check generated files
This gives the test cases the ability to supply files that must be
checked after the test is run, rather than just checking stdout/stderr.
This is intended to be used with tools that generate files, like depmod.
It includes a poor's man implementation of a "check for differences in
files". Not really optimized, but it's simple enough and does what it
proposes to.
Lucas De Marchi [Wed, 3 Oct 2012 19:28:24 +0000 (16:28 -0300)]
depmod: fix parsing of modules.order with compressed modules
We now index the modules by uncompressed-relative-path instead of
relative-path. This is because the file modules.order, coming from
kernel, always comes with uncompressed paths. This fixes the issue of
not sorting the aliases correctly due to paths not matching when using
compressed modules.
Dave Reisner [Thu, 27 Sep 2012 15:00:42 +0000 (11:00 -0400)]
build-sys: Remove --with-rootprefix option
This is a broken option that only leads to misery and incompatabilities
with other systems. Kbuild doesn't come close to supporting directories
other than /lib/modules with several targets simply failing without
hacky fixes. Simply remove the option and all traces of it, as it
doesn't make sense in today's world.
Lucas De Marchi [Fri, 14 Sep 2012 14:18:41 +0000 (11:18 -0300)]
build-sys: Append -Werror when testing flags
Clang doesn't treat unknown warnings flags as an error, but rather as a
warning. The result is that the detection for whic CFLAGS are supported
by this compiler will not work, since the compilation will succeed.
With this patch we now successfully detect clang doesn't support
-Wlogical-op, as opposed to previous behavior:
checking if clang supports flag -Wlogical-op in envvar CFLAGS... no
We use this macro only for LDFLAGS and CFLAGS, so it's safe to stash
-Werror there.
Jan Engelhardt [Thu, 13 Sep 2012 23:55:54 +0000 (01:55 +0200)]
NEWS: language corrections
Dave Reisner [Sat, 8 Sep 2012 16:22:11 +0000 (12:22 -0400)]
modinfo: clarify verbiage for field shortcuts
Cleanup the punctuation and grammar in this blurb, specifically pointing
out what these are shortcuts for.
Dave Reisner [Sat, 8 Sep 2012 15:43:54 +0000 (11:43 -0400)]
Makefile: remove redundant flags to $(RM)
$(RM) will always expand to 'rm -f' which means we don't need to ignore
errors or pass this flag again.
Dave Reisner [Sat, 8 Sep 2012 18:08:50 +0000 (14:08 -0400)]
Define rootfs as dependency of check-am
This should actually fix the problem of ensuring that the rootfs is
created every time that 'make check' is run.
Dave Reisner [Sat, 8 Sep 2012 15:50:56 +0000 (11:50 -0400)]
Revert "build-sys: disable jobserver for rootfs target"
This is bogus and does not work.
This reverts commit
4e7f0f204bc82ce749cad6613b066993f530cbe6.
Lucas De Marchi [Fri, 7 Sep 2012 17:59:35 +0000 (14:59 -0300)]
testsuite: Fix double definition of 64-bits variant
If _FILE_OFFSET_BITS is defined we should not be wrapping these 64
variants, since they are macros in libc.
Lucas De Marchi [Thu, 6 Sep 2012 19:26:53 +0000 (16:26 -0300)]
kmod 10
Lucas De Marchi [Fri, 31 Aug 2012 09:59:26 +0000 (06:59 -0300)]
Remove test directory
All tests should be in testsuite. The remaining tests in this directory
are not relevant enough to be ported. git log can be consulted if in
future we decide to put them in testsuite.
Lucas De Marchi [Thu, 30 Aug 2012 17:10:47 +0000 (14:10 -0300)]
TODO: deprecate use of rmmod -w
As discussed with Rusty Russel, it would be nice to remove the related
code from kernel. Deprecate its use on kmod, so people know they
shouldn't be using it.
Lucas De Marchi [Fri, 17 Aug 2012 12:42:47 +0000 (09:42 -0300)]
modprobe: Unconditionally use KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY
This fixes a change in behavior regarding kmod and module-init-tools:
when trying to load a module by alias, we should check if it's
blacklisted, regardless of the command line arguments passed.
This was reported by "Dmitry V. Levin <ldv@altlinux.org>".
Lucas De Marchi [Fri, 17 Aug 2012 12:38:05 +0000 (09:38 -0300)]
libkmod-module: Add KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY flag
With this flag kmod_module_probe_insert_module() check if module is
blacklisted only if it's also an alias. This is needed in order to allow
blacklisting a module by name and effectively blacklisting all its
aliases as module-init-tools was doing.
Before this patch we could load pcspkr module as follows:
/etc/modprobe.d/test.conf:
alias yay pcspkr
blacklist pcspkr
$ modprobe yay
Now libkmod has support to blacklist "yay" because "pcspkr" is blacklisted.
Martin Pitt [Wed, 1 Aug 2012 21:35:34 +0000 (23:35 +0200)]
testsuite preload: Factorize into macros, add more stat and open variants
Instead of replicating the same code several times, define and use macros for
the various types of wrapped functions in the testsuite's path.c LD_PRELOAD
wrapper.
Add various __xstat() variants and open64(), which are being used when enabling
large file support.
Lucas De Marchi [Tue, 31 Jul 2012 12:58:21 +0000 (09:58 -0300)]
README: let people know they don't need to subscribe
People are afraid to CC the mailing list because they think they need to
subscribe (and a lot of them are already subscribed to too many lists).
Lucas De Marchi [Tue, 31 Jul 2012 12:51:48 +0000 (09:51 -0300)]
build-sys: add 'man' entry in summary
Colin Walters [Mon, 30 Jul 2012 16:27:10 +0000 (12:27 -0400)]
build-sys: Add --disable-manpages option
1) Embedded systems often don't want man pages on the
target; rather than pointlessly building them, then ignoring
the result, allow just not building them at all
2) When bootstrapping an operating systems, documentation is the
source of many cyclical dependencies, and allowing it to
be explicitly disabled is useful for earlier build passes.
Dave Reisner [Wed, 25 Jul 2012 23:52:20 +0000 (19:52 -0400)]
man/rmmod: specify each option in separate <term> tag
Dave Reisner [Wed, 25 Jul 2012 23:49:00 +0000 (19:49 -0400)]
man/depmod: specify each option in separate <term> tag
Dave Reisner [Wed, 25 Jul 2012 23:45:46 +0000 (19:45 -0400)]
man/modprobe: specify each option in separate <term> tag
Dave Reisner [Wed, 25 Jul 2012 23:40:10 +0000 (19:40 -0400)]
man/modinfo: specify each option in separate <term> tag
This has the end result of comma delimiting equivalent options in the
manpage, similar to many other manuals.
Dave Reisner [Wed, 25 Jul 2012 23:36:40 +0000 (19:36 -0400)]
man/modinfo: document longopts for field shortcuts
Dave Reisner [Wed, 25 Jul 2012 23:29:40 +0000 (19:29 -0400)]
man/modinfo: document --basedir option
This was never documented in the manpage of module-init-tools either.
The flag is identical in function to modprobe's --dirname option, so use
the same language to describe it.
Dave Reisner [Wed, 25 Jul 2012 23:30:19 +0000 (19:30 -0400)]
man/modprobe: clarify --dirname option
The documentation for this flag leads one to believe that the full path
to the module directory is needed. In reality, this flag specifies only
the root of the module path.
Lucas De Marchi [Wed, 18 Jul 2012 13:19:48 +0000 (10:19 -0300)]
Use #pragma once instead of #ifndef
Only the public header maintains #ifndef in the header, together with
pragma. The other ones contain only pragma.
As reported by Shawn Landden on systemd mailing list this is compatible
with all major compilers and gcc has this since version 3.3.
Dave Reisner [Tue, 10 Jul 2012 13:32:12 +0000 (09:32 -0400)]
build-sys: disable jobserver for rootfs target
2588e3dff5d broke the distcheck target. Fix it by serializing the rootfs
(re)creation prior to running the testsuite.
Lucas De Marchi [Tue, 10 Jul 2012 12:42:24 +0000 (09:42 -0300)]
testsuite: re-license under LGPL
Martin Pitt [Tue, 10 Jul 2012 07:19:50 +0000 (09:19 +0200)]
testsuite: path wrapper: Fix open() with 3 arguments
Properly return the original libc return value in the case that open() is
called with 3 arguments.
Dave Reisner [Thu, 28 Jun 2012 13:09:48 +0000 (09:09 -0400)]
module: support reading coresize from /sys if supported
Linux 3.3 introduced the coresize attribute in /sys/module/*. When
available, use this instead of parsing some portion of /proc/modules.
Dave Reisner [Thu, 28 Jun 2012 15:16:36 +0000 (11:16 -0400)]
Implicitly run 'make rootfs' with 'make check'
Avoid the need for the user to run this manually after a run of the
testsuite by adding it.
Lucas De Marchi [Thu, 21 Jun 2012 14:30:56 +0000 (11:30 -0300)]
testsuite: use right offset for module name
We need to cope with the case in which a 32 bits machine is opening a 64
bits kernel module and vice-versa. The offset in `struct module' are
different and do not depend on the architecture we are running, but
rather on the architecture they were created for.
This fixes `make check' in 32 bits machines (since we are shipping 64
bits modules for testing)
Lucas De Marchi [Tue, 19 Jun 2012 22:46:53 +0000 (19:46 -0300)]
kmod 9
Lucas De Marchi [Tue, 19 Jun 2012 16:27:17 +0000 (13:27 -0300)]
build-sys: allow compressed modules in testsuite
Lucas De Marchi [Tue, 19 Jun 2012 16:09:23 +0000 (13:09 -0300)]
build-sys: Make dirs writable on rootfs creation
Autofoo make the dist dir as readonly. If we copy it, tools needing to
create sysfs entries will not be able to do so, because they can't
create the needed directories/files.
It would be much better if autofoo allowed to let the files as is
instead of converting them to read-only.
Lucas De Marchi [Sat, 16 Jun 2012 01:14:00 +0000 (22:14 -0300)]
depmod: use ferror and fclose to check for error
Thanks to hpa for point this out.