opensuse:module-init-tools.git
9 years agoIt is often advantageous to pass parameters to built-in kernel modules
Jon Masters [Tue, 9 Sep 2008 15:40:15 +0000 (11:40 -0400)]
It is often advantageous to pass parameters to built-in kernel modules
at boot time using the convention <module>.<option>. However, this does
not work with loadable modules where modprobe reads its options from the
config files. This patch adds support for modprobe to read /proc/cmdline
and add any options it finds when inserting the modules.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
10 years agoUpdate version to v3.4. v3.4
Jon Masters [Sun, 7 Oct 2007 21:53:37 +0000 (17:53 -0400)]
Update version to v3.4.

10 years agoMerge ../remotes/kay-mit
Jon Masters [Sun, 7 Oct 2007 21:39:02 +0000 (17:39 -0400)]
Merge ../remotes/kay-mit

10 years ago[PATCH 2/2] Fix (improve) deadlock condition on module removal netfilter socket optio... v3.3-pre12
Jon Masters [Wed, 5 Sep 2007 20:53:42 +0000 (16:53 -0400)]
[PATCH 2/2] Fix (improve) deadlock condition on module removal netfilter socket option removal

This patch comes by way of Neil Horman, who while fixing an issue with some
netfilter module dependencies noticed a wider issue (still being debated). I
reworked it only minorly to apply and to update the SGML markup and not man.
Will be testing this some more...

From: Neil Horman <nhorman@tuxdriver.com>

Hey-
        2nd of two patches.  This patch enhances modprobe to operate like rmmod
in non-blocking mode.  It also adds a -w option to allow for explicit blocking
operation.

Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jon Masters <jcm@redhat.com>
10 years agomodprobe: apply the blacklist to all aliases
Kay Sievers [Thu, 30 Aug 2007 00:16:01 +0000 (02:16 +0200)]
modprobe: apply the blacklist to all aliases

Module blacklist entries did not get applied to configured aliases.
Modprobe configuration files are often used to supply missing aliases
which are (now) not provided by kernel modules itself. This lets possibly
configured blacklist entries disable all alias resolving, regardless
of the source of the alias.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
10 years agomodprobe.8: add --use-blacklist option
Kay Sievers [Thu, 30 Aug 2007 00:14:55 +0000 (02:14 +0200)]
modprobe.8: add --use-blacklist option

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
10 years agodepmod.8: replace unicode by plain ascii
Kay Sievers [Thu, 30 Aug 2007 00:14:18 +0000 (02:14 +0200)]
depmod.8: replace unicode by plain ascii

Unicode chars didn't make it into the man page anyway, so replace them
to get rid of the warnings, and let them show up in the man page.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
10 years agoMake module-init-tools build with ANSI C 89 compiler
Jon Masters [Mon, 30 Jul 2007 21:34:14 +0000 (17:34 -0400)]
Make module-init-tools build with ANSI C 89 compiler

From: Petter Reinholdtsen <pere@hungry.com>

The source for module-init-tools version 3.3-pre4-2 fail to build with
an ANSI C 89 compiler, because variables are defined after a statement
in one place of the code.  This patch solve the problem.  Please
include it to make the source easier to build in sub-optimal
environments.

10 years ago[PATCH] module-init-tools : insmod_correct_argv0_computation
Jon Masters [Mon, 30 Jul 2007 21:09:30 +0000 (17:09 -0400)]
[PATCH] module-init-tools : insmod_correct_argv0_computation

From: "Francois Barre" <francois.barre@gmail.com>

This patch corrects an invalid behaviour when insmod is called
direclty from console without any '/' in argv[0].

It is based on module-init-tools-3.3-pre11

11 years ago[CLEANUP] Cleanup tree and add a HACKING doc. v3.3-pre11
Jon Masters [Thu, 22 Mar 2007 07:36:02 +0000 (03:36 -0400)]
[CLEANUP] Cleanup tree and add a HACKING doc.

We've been meaning to cleanup the tree for a while. The git repo should be nice
and clean now, and if you follow the HACKING doc, easily build-populated too.

Signed-off-by: Jon Masters <jcm@redhat.com>
11 years ago[PATCH] Handle multiple kernels in modinfo.
Jon Masters [Tue, 20 Mar 2007 19:52:30 +0000 (15:52 -0400)]
[PATCH] Handle multiple kernels in modinfo.

As part of some other work that needed information about various installed
modules, modinfo was modified to support a '-k' kernel parameter.

Signed-off-by: Keiichiro Tokunaga <ktokunag@redhat.com>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoprocess: get in the habit of updating ChangeLog too. v3.3-pre10
Jon Masters [Thu, 22 Feb 2007 02:12:13 +0000 (21:12 -0500)]
process: get in the habit of updating ChangeLog too.

On each update, I should regenerate the configure/configure.ac/Makefile.in
files and update the ChangeLog too just as I bump the revision.

Signed-off-by: Jon Masters <jcm@redhat.com>
11 years agobuild-system: re-add Makefile.in to default distribution v3.3-pre9
Jon Masters [Thu, 22 Feb 2007 01:48:30 +0000 (20:48 -0500)]
build-system: re-add Makefile.in to default distribution

Luiz removed Makefile.in via .gitignore. I understand why this was removed,
but again, people expect to do the configure dance out of the box. I guess
for now, I will rebuild configure and Makefile.in on each update using the
autotools on my devel box - anyone doing something weird can run autotools
for themselves. The advantage here is less "it's broken" email :-)

Signed-off-by: Jon Masters <jcm@redhat.com>
11 years agobuild-system: re-add a default configure script for ease of building. v3.3-pre8
Jon Masters [Thu, 22 Feb 2007 01:40:25 +0000 (20:40 -0500)]
build-system: re-add a default configure script for ease of building.

Luiz took the configure script out via .gitignore. I understand why, but I
think we should have a default script built with a quasi-recent autoconf
in the distribution /because/ people expect to be able to run it. If
they actually need to update configure, they probably know how.

I guess I should automate having configure be rebuilt.

Signed-off-by: Jon Masters <jcm@redhat.com>
11 years agobuild-system: update configure.ac's m-i-t version number. v3.3-pre7
Jon Masters [Wed, 21 Feb 2007 20:20:29 +0000 (15:20 -0500)]
build-system: update configure.ac's m-i-t version number.

Signed-off-by: Jon Masters <jcm@redhat.com>
11 years agoMerge branch 'depmod-misc-fixes' of http://distro2.conectiva.com.br/~lcapitulino...
Jon Masters [Wed, 21 Feb 2007 20:17:37 +0000 (15:17 -0500)]
Merge branch 'depmod-misc-fixes' of distro2.conectiva.com.br/~lcapitulino/git/module-init-tools-lcpt

11 years agoMerge branch 'misc-fixes' of http://distro2.conectiva.com.br/~lcapitulino/git/module...
Jon Masters [Wed, 21 Feb 2007 20:17:24 +0000 (15:17 -0500)]
Merge branch 'misc-fixes' of distro2.conectiva.com.br/~lcapitulino/git/module-init-tools-lcpt

11 years ago[PATCH] Correct strdup error handling and insmod.static handling
Tobias Stoeckmann [Wed, 21 Feb 2007 20:09:59 +0000 (15:09 -0500)]
[PATCH] Correct strdup error handling and insmod.static handling

There is one more problem about memory allocation in insmod: strdup("") could
fail. If this happens, realloc() accesses later on strlen(options). A call like
strlen(NULL) segfaults on my system (glibc 2.4).

Another thing worth to mention is that strstr() on argv[0] raises another
little problem - or perhaps intented behaviour:

/my/path/insmod.static/../../../sbin/insmod
(or anything else that contains insmod.static)

This call results in using old insmod. Fix for this is to check only the string
after last occurence of "/".

Signed-off-by: Jon Masters <jcm@redhat.com>
Signed-off-by: Tobias Stoeckmann <tobias@bugol.de>
11 years agodepmod: Allocate do_module()'s newpath in the stack
Luiz Fernando N. Capitulino [Sat, 10 Feb 2007 14:51:33 +0000 (12:51 -0200)]
depmod: Allocate do_module()'s newpath in the stack

No reason to allocate in the heap.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod: Add checks to strdup()'s return value
Luiz Fernando N. Capitulino [Fri, 9 Feb 2007 21:41:23 +0000 (19:41 -0200)]
depmod: Add checks to strdup()'s return value

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod: do_module() leak fix
Luiz Fernando N. Capitulino [Fri, 9 Feb 2007 20:11:25 +0000 (18:11 -0200)]
depmod: do_module() leak fix

When a higher priority module is found, we have to free the memory
allocated by the module we're about to remove from the list.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod: read_config_file() should abort on error
Luiz Fernando N. Capitulino [Fri, 9 Feb 2007 19:10:47 +0000 (17:10 -0200)]
depmod: read_config_file() should abort on error

read_config_file() silently skips fopen()'s errors when opening
config files.

It's ok to ignore ENOENT, since config files are optional. But any
other error should be reported as usual.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod.8: Add -C text
Luiz Fernando N. Capitulino [Fri, 9 Feb 2007 18:17:14 +0000 (16:17 -0200)]
depmod.8: Add -C text

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod.8: Remove duplicated 'basedir' from -b option
Luiz Fernando N. Capitulino [Fri, 9 Feb 2007 17:41:55 +0000 (15:41 -0200)]
depmod.8: Remove duplicated 'basedir' from -b option

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod.8: List options in alphabetical order
Luiz Fernando N. Capitulino [Fri, 9 Feb 2007 17:38:11 +0000 (15:38 -0200)]
depmod.8: List options in alphabetical order

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod: load_system_map() minor optimization.
Luiz Fernando N. Capitulino [Sat, 23 Dec 2006 14:04:50 +0000 (12:04 -0200)]
depmod: load_system_map() minor optimization.

The load_system_map() function calls strlen() to get the length of the
"__ksymtab_" string twice as follows:

 * For each line of the System.map file
 * For each symbol which starts with "__ksymtab_"

It's smarter to call it once, before the loop is entered. That's what
this patch does.

Addittionally a string duplication is also fixed.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agodepmod: Fixes load_system_map() NULL pointer.
Luiz Fernando N. Capitulino [Sat, 23 Dec 2006 14:04:50 +0000 (12:04 -0200)]
depmod: Fixes load_system_map() NULL pointer.

depmod's load_system_map() function assumes that System.map file lines
aways ends with newlines ('\n').

However, in some Linux distributions it may not be true, which will lead
to a Segmentation Fault.

To fix the problem we have to check 'ptr' right after we look for the
newline character using strchr().

This is bug #2, report and suggested fix by shenlinf@cn.ibm.com.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agorepo: More files to .gitignore
Luiz Fernando N. Capitulino [Sat, 23 Dec 2006 14:04:50 +0000 (12:04 -0200)]
repo: More files to .gitignore

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agobuild-system: updates configure.ac's m-i-t version number.
Luiz Fernando N. Capitulino [Sat, 23 Dec 2006 14:04:50 +0000 (12:04 -0200)]
build-system: updates configure.ac's m-i-t version number.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agobuild-system: renames configure.in file.
Luiz Fernando N. Capitulino [Sat, 23 Dec 2006 14:04:49 +0000 (12:04 -0200)]
build-system: renames configure.in file.

The .in extension is deprecated, the .ac one is preferred now.

More information can be found in the autoconf manual.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years agobuild-system: Removes autotools generated files.
Luiz Fernando N. Capitulino [Sat, 23 Dec 2006 14:04:49 +0000 (12:04 -0200)]
build-system: Removes autotools generated files.

These files should not be added to the repository because they're generated
automatically by the autotools.

More information can be found in the autoconf and automake manuals.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
11 years ago[PATCH] [Fwd: module-init-tools-3.3-pre1 - config.sub doesn't recognize uClibc based... v3.3-pre6
Ladislav Michl [Mon, 15 Jan 2007 16:23:39 +0000 (17:23 +0100)]
[PATCH] [Fwd: module-init-tools-3.3-pre1 - config.sub doesn't recognize uClibc based system]

On Mon, Jan 08, 2007 at 11:01:34PM +1100, Rusty Russell wrote:
> Hi Ladislav,
>
>  Jon Masters is the new maintainer, fwding to him...

Hi Rusty,

thanks for information. For new maintainer's convenience a patch updating
config.guess and confing.sub to the lastest and greatest version as
provided by FSF can be found at the end of this email.

Thanks,
ladis

> -------- Forwarded Message --------
> From: Ladislav Michl <ladis@linux-mips.org>
> To: Rusty Russell <rusty@rustcorp.com.au>
> Subject: module-init-tools-3.3-pre1 - config.sub doesn't recognize
> uClibc based system
> Date: Mon, 8 Jan 2007 11:17:10 +0100
>
> Hi,
>
> would you mind to update config.sub to some more recent version? The one
> with timestamp 2005-07-08 handles my gcc-3.4.3-uclibc-0.9.27 toolchain
> correctly. Current one fails with:
> checking target system type... Invalid configuration `arm-linux-uclibc': system `uclibc' not recognized
> configure: error: /bin/sh ./config.sub arm-linux-uclibc failed
>
> Thanks,
>  ladis

Update config.guess and confing.sub to the lastest version as
provided by FSF

Signed-off-by Ladislav Michl <ladis@linux-mips.org>

Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agomodprobe: Fix format string bug in do_command() v3.3-pre5
Sergey Vlasov [Wed, 3 Jan 2007 15:13:06 +0000 (18:13 +0300)]
modprobe: Fix format string bug in do_command()

gcc produces the following warning on x86_64:

modprobe.c:786: warning: field precision should have type 'int', but argument 3 has type 'long int'

This bug is currently harmless on x86_64, because parameters are
passed in registers, but could cause misbehavior on other 64-bit
platforms.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
11 years agomodprobe: Do not pass cmdline_opts to subordinate modules
Sergey Vlasov [Wed, 3 Jan 2007 15:01:40 +0000 (18:01 +0300)]
modprobe: Do not pass cmdline_opts to subordinate modules

Options from the modprobe command line should be passed only to the
install/remove command for the module specified on the command line,
and not to modules which the requested module depends on.

Fixes http://bugzilla.kerneltools.org/show_bug.cgi?id=1

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
11 years agoAdd .gitignore file to unclutter "git status" output
Sergey Vlasov [Tue, 2 Jan 2007 17:44:00 +0000 (20:44 +0300)]
Add .gitignore file to unclutter "git status" output

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
11 years agoRemove more garbage from the repository
Sergey Vlasov [Tue, 2 Jan 2007 17:35:59 +0000 (20:35 +0300)]
Remove more garbage from the repository

config.status is generated by ./configure and should not be stored
in the repository; autom4te.cache/* and .deps/* also should not be
there.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
11 years agoI previously applied a patch to add --dump-modversions to modprobe but this was v3.3-pre4
Jonathan Masters [Fri, 8 Dec 2006 10:25:36 +0000 (05:25 -0500)]
I previously applied a patch to add --dump-modversions to modprobe but this was
not covered by the usage instructions on that command.

11 years ago-------- Forwarded Message --------
Jonathan Masters [Fri, 8 Dec 2006 10:22:01 +0000 (05:22 -0500)]
-------- Forwarded Message --------
From: Steven J. Hill <sjhill@realitydiluted.com>
To: rusty@rustcorp.com.au
Subject: Remove usage of legacy 'index' function.
Date: Mon, 04 Dec 2006 20:04:00 -0600

Rusty,

Attached is a patch to remove usage of the legacy 'index' function. Thanks.

-Steve

11 years agoSubject: modinfo: Memory leak fixes.
Jonathan Masters [Fri, 8 Dec 2006 10:17:36 +0000 (05:17 -0500)]
Subject: modinfo: Memory leak fixes.

Only happens when more than one module is passed in the command-line.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: rmmod: Changes exit() return value.
Jonathan Masters [Fri, 8 Dec 2006 10:16:35 +0000 (05:16 -0500)]
Subject: rmmod: Changes exit() return value.

In the current implementation if rmmod fails, it will return the last
error it got.

This is not very good because it's not consistent and if the error is
negative, we'll have not standard return error codes from rmmod (eg, 255)

This patch changes that behaivor by always returning 1 if at least one
of the modules to remove failed.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: zlibsupport: Adds missing fstat() return value check.
Jonathan Masters [Fri, 8 Dec 2006 10:15:52 +0000 (05:15 -0500)]
Subject: zlibsupport: Adds missing fstat() return value check.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: zlibsupport: Adds missing realloc() check.
Jonathan Masters [Fri, 8 Dec 2006 10:15:01 +0000 (05:15 -0500)]
Subject: zlibsupport: Adds missing realloc() check.

Without this check we may leak memory.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: depmod: adds missing fclose() in load_system_map().
Jonathan Masters [Fri, 8 Dec 2006 10:14:01 +0000 (05:14 -0500)]
Subject: depmod: adds missing fclose() in load_system_map().

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: depmod: adds missing options to manpage.
Jonathan Masters [Fri, 8 Dec 2006 10:12:59 +0000 (05:12 -0500)]
Subject: depmod: adds missing options to manpage.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: depmod: print_usage() minor fixes.
Jonathan Masters [Fri, 8 Dec 2006 10:11:58 +0000 (05:11 -0500)]
Subject: depmod: print_usage() minor fixes.

Adds missing options, and kernel modules now are .ko.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: insmod: Fixes errno override.
Jonathan Masters [Fri, 8 Dec 2006 10:10:47 +0000 (05:10 -0500)]
Subject: insmod: Fixes errno override.

If the read() call in grab_file() fails, errno can be overriden by the
call to close().

It's better to stay with read()'s error because it probably has the
explanation we're interested in.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: insmod: Adds missing realloc() check.
Jonathan Masters [Fri, 8 Dec 2006 10:05:17 +0000 (05:05 -0500)]
Subject: insmod: Adds missing realloc() check.

Without this check we'll get a NULL pointer dereference if realloc() fails.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoSubject: insmod: Fixes grab_file() NULL pointer.
Jonathan Masters [Fri, 8 Dec 2006 10:03:52 +0000 (05:03 -0500)]
Subject: insmod: Fixes grab_file() NULL pointer.

If realloc() fails, it will return NULL and we'll pass 'NULL + *size' to
read().

This patch fixes it by adding the proper check and a new variable to store
the realloc() return value, to avoid leaking memory.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
11 years agoLuiz Fernando N. Capitulino mentioned that some dud files were left after my
Jonathan Masters [Fri, 8 Dec 2006 10:02:19 +0000 (05:02 -0500)]
Luiz Fernando N. Capitulino mentioned that some dud files were left after my
last release. Sorry about that; the files have now been cleaned out.

11 years agoBegin tracking post-3.3-pre3 development with git.
Jonathan Masters [Fri, 8 Dec 2006 10:01:05 +0000 (05:01 -0500)]
Begin tracking post-3.3-pre3 development with git.

Thanks to Luiz Fernando N. Capitulino for his mail, suggesting that it might be
really good to begin tracking development with a proper SCM. This is especially
important now that we're trying to actively encourage greater involvement in
development once more. I'm looking for more patches and git trees to merge!