diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 20:17:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 20:17:38 -0400 |
| commit | bdf428feb225229b1d4715b45bbdad4a934cd89c (patch) | |
| tree | 9bc47e348c2081fd46c0f7d715780ce294a6953d /scripts | |
| parent | a40a7201a4584a66ab234ba1006472be952f20e0 (diff) | |
| parent | 184c3fc3f52fb75800deb76deffb70907d1f76ea (diff) | |
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module update from Rusty Russell:
"Nothing major: support for compressing modules, and auto-tainting
params.
PS. My virtio-next tree is empty: DaveM took the patches I had. There
might be a virtio-rng starvation fix, but so far it's a bit voodoo
so I will get to that in the next two days or it will wait"
* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
moduleparam: Resolve missing-field-initializer warning
kbuild: handle module compression while running 'make modules_install'.
modinst: wrap long lines in order to enhance cmd_modules_install
modsign: lookup lines ending in .ko in .mod files
modpost: simplify file name generation of *.mod.c files
modpost: reduce visibility of symbols and constify r/o arrays
param: check for tainting before calling set op.
drm/i915: taint the kernel if unsafe module parameters are set
module: add module_param_unsafe and module_param_named_unsafe
module: make it possible to have unsafe, tainting module params
module: rename KERNEL_PARAM_FL_NOARG to avoid confusion
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.modinst | 7 | ||||
| -rw-r--r-- | scripts/Makefile.modsign | 2 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 25 |
3 files changed, 20 insertions, 14 deletions
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index 95ec7b35e8b6..e48a4e9d8868 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst | |||
| @@ -18,7 +18,12 @@ __modinst: $(modules) | |||
| 18 | 18 | ||
| 19 | # Don't stop modules_install if we can't sign external modules. | 19 | # Don't stop modules_install if we can't sign external modules. |
| 20 | quiet_cmd_modules_install = INSTALL $@ | 20 | quiet_cmd_modules_install = INSTALL $@ |
| 21 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) | 21 | cmd_modules_install = \ |
| 22 | mkdir -p $(2) ; \ | ||
| 23 | cp $@ $(2) ; \ | ||
| 24 | $(mod_strip_cmd) $(2)/$(notdir $@) ; \ | ||
| 25 | $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) ; \ | ||
| 26 | $(mod_compress_cmd) $(2)/$(notdir $@) | ||
| 22 | 27 | ||
| 23 | # Modules built outside the kernel source tree go into extra by default | 28 | # Modules built outside the kernel source tree go into extra by default |
| 24 | INSTALL_MOD_DIR ?= extra | 29 | INSTALL_MOD_DIR ?= extra |
diff --git a/scripts/Makefile.modsign b/scripts/Makefile.modsign index abfda626dbad..b6ac7084da79 100644 --- a/scripts/Makefile.modsign +++ b/scripts/Makefile.modsign | |||
| @@ -7,7 +7,7 @@ __modsign: | |||
| 7 | 7 | ||
| 8 | include scripts/Kbuild.include | 8 | include scripts/Kbuild.include |
| 9 | 9 | ||
| 10 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) | 10 | __modules := $(sort $(shell grep -h '\.ko$$' /dev/null $(wildcard $(MODVERDIR)/*.mod))) |
| 11 | modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) | 11 | modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) |
| 12 | 12 | ||
| 13 | PHONY += $(modules) | 13 | PHONY += $(modules) |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 091d90573b63..3b405c726ec5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -24,9 +24,9 @@ | |||
| 24 | #include "../../include/linux/export.h" | 24 | #include "../../include/linux/export.h" |
| 25 | 25 | ||
| 26 | /* Are we using CONFIG_MODVERSIONS? */ | 26 | /* Are we using CONFIG_MODVERSIONS? */ |
| 27 | int modversions = 0; | 27 | static int modversions = 0; |
| 28 | /* Warn about undefined symbols? (do so if we have vmlinux) */ | 28 | /* Warn about undefined symbols? (do so if we have vmlinux) */ |
| 29 | int have_vmlinux = 0; | 29 | static int have_vmlinux = 0; |
| 30 | /* Is CONFIG_MODULE_SRCVERSION_ALL set? */ | 30 | /* Is CONFIG_MODULE_SRCVERSION_ALL set? */ |
| 31 | static int all_versions = 0; | 31 | static int all_versions = 0; |
| 32 | /* If we are modposting external module set to 1 */ | 32 | /* If we are modposting external module set to 1 */ |
| @@ -229,7 +229,7 @@ static struct symbol *find_symbol(const char *name) | |||
| 229 | return NULL; | 229 | return NULL; |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | static struct { | 232 | static const struct { |
| 233 | const char *str; | 233 | const char *str; |
| 234 | enum export export; | 234 | enum export export; |
| 235 | } export_list[] = { | 235 | } export_list[] = { |
| @@ -805,7 +805,7 @@ static int match(const char *sym, const char * const pat[]) | |||
| 805 | } | 805 | } |
| 806 | 806 | ||
| 807 | /* sections that we do not want to do full section mismatch check on */ | 807 | /* sections that we do not want to do full section mismatch check on */ |
| 808 | static const char *section_white_list[] = | 808 | static const char *const section_white_list[] = |
| 809 | { | 809 | { |
| 810 | ".comment*", | 810 | ".comment*", |
| 811 | ".debug*", | 811 | ".debug*", |
| @@ -882,17 +882,18 @@ static void check_section(const char *modname, struct elf_info *elf, | |||
| 882 | #define MEM_EXIT_SECTIONS ".memexit.*" | 882 | #define MEM_EXIT_SECTIONS ".memexit.*" |
| 883 | 883 | ||
| 884 | /* init data sections */ | 884 | /* init data sections */ |
| 885 | static const char *init_data_sections[] = { ALL_INIT_DATA_SECTIONS, NULL }; | 885 | static const char *const init_data_sections[] = |
| 886 | { ALL_INIT_DATA_SECTIONS, NULL }; | ||
| 886 | 887 | ||
| 887 | /* all init sections */ | 888 | /* all init sections */ |
| 888 | static const char *init_sections[] = { ALL_INIT_SECTIONS, NULL }; | 889 | static const char *const init_sections[] = { ALL_INIT_SECTIONS, NULL }; |
| 889 | 890 | ||
| 890 | /* All init and exit sections (code + data) */ | 891 | /* All init and exit sections (code + data) */ |
| 891 | static const char *init_exit_sections[] = | 892 | static const char *const init_exit_sections[] = |
| 892 | {ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL }; | 893 | {ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL }; |
| 893 | 894 | ||
| 894 | /* data section */ | 895 | /* data section */ |
| 895 | static const char *data_sections[] = { DATA_SECTIONS, NULL }; | 896 | static const char *const data_sections[] = { DATA_SECTIONS, NULL }; |
| 896 | 897 | ||
| 897 | 898 | ||
| 898 | /* symbols in .data that may refer to init/exit sections */ | 899 | /* symbols in .data that may refer to init/exit sections */ |
| @@ -906,8 +907,8 @@ static const char *data_sections[] = { DATA_SECTIONS, NULL }; | |||
| 906 | "*_probe_one", \ | 907 | "*_probe_one", \ |
| 907 | "*_console" | 908 | "*_console" |
| 908 | 909 | ||
| 909 | static const char *head_sections[] = { ".head.text*", NULL }; | 910 | static const char *const head_sections[] = { ".head.text*", NULL }; |
| 910 | static const char *linker_symbols[] = | 911 | static const char *const linker_symbols[] = |
| 911 | { "__init_begin", "_sinittext", "_einittext", NULL }; | 912 | { "__init_begin", "_sinittext", "_einittext", NULL }; |
| 912 | 913 | ||
| 913 | enum mismatch { | 914 | enum mismatch { |
| @@ -929,7 +930,7 @@ struct sectioncheck { | |||
| 929 | const char *symbol_white_list[20]; | 930 | const char *symbol_white_list[20]; |
| 930 | }; | 931 | }; |
| 931 | 932 | ||
| 932 | const struct sectioncheck sectioncheck[] = { | 933 | static const struct sectioncheck sectioncheck[] = { |
| 933 | /* Do not reference init/exit code/data from | 934 | /* Do not reference init/exit code/data from |
| 934 | * normal code and data | 935 | * normal code and data |
| 935 | */ | 936 | */ |
| @@ -2211,7 +2212,7 @@ int main(int argc, char **argv) | |||
| 2211 | err = 0; | 2212 | err = 0; |
| 2212 | 2213 | ||
| 2213 | for (mod = modules; mod; mod = mod->next) { | 2214 | for (mod = modules; mod; mod = mod->next) { |
| 2214 | char fname[strlen(mod->name) + 10]; | 2215 | char fname[PATH_MAX]; |
| 2215 | 2216 | ||
| 2216 | if (mod->skip) | 2217 | if (mod->skip) |
| 2217 | continue; | 2218 | continue; |
