| Age | Commit message (Collapse) | Author |
|
From: Rusty Russell <rusty@rustcorp.com.au>
Found this while converting netfilter modules to use the new
parameters. Also fixes an out-by-one error in maximum elements you
can put in array.
The current "intarray" module params were never tested, and um, suck.
Only one person uses them, and it looks painful.
Since noone uses them, replace them with tested versions.
|
|
Thanks to Jan Hubicka who suggested this fix.
The problem seems to be that gcc generates a 32byte alignment for static
objects > 32bytes. This causes gas to set a high alignment on the
section, which causes the uneven (not multiple of sizeof(struct
kernel_param)) section size. The pointer division with a base not being
a multiple of sizeof(*ptr) then causes the invalid result.
This just forces a small alignment, which makes the section end come out
with the correct alignment.
The only mystery left is why ld chose a 16 byte padding instead of
32byte.
|
|
Add a const declaration to the __module_param_call so __param section
gets more correct attributes.
|
|
This patch is a rewrite of the insmod and boot parameter handling,
to unify them.
The new format is fairly simple: built on top of __module_param_call there
are several helpers, eg "module_param(foo, int, 000)". The final argument
is the permissions bits, for exposing parameters in sysfs (if
non-zero) at a later stage.
|