Skip to content

Commit

Permalink
Re-enable CONFIG_MODVERSIONS in a slightly weaker form
Browse files Browse the repository at this point in the history
This enables CONFIG_MODVERSIONS again, but allows for missing symbol CRC
information in order to work around the issue that newer binutils
versions seem to occasionally drop the CRC on the floor.  binutils 2.26
seems to work fine, while binutils 2.27 seems to break MODVERSIONS of
symbols that have been defined in assembler files.

[ We've had random missing CRC's before - it may be an old problem that
  just is now reliably triggered with the weak asm symbols and a new
  version of binutils ]

Some day I really do want to remove MODVERSIONS entirely.  Sadly, today
does not appear to be that day: Debian people apparently do want the
option to enable MODVERSIONS to make it easier to have external modules
across kernel versions, and this seems to be a fairly minimal fix for
the annoying problem.

Cc: Ben Hutchings <[email protected]>
Acked-by: Michal Marek <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Nov 30, 2016
1 parent 22d3d4f commit faaae2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,6 @@ config MODULE_FORCE_UNLOAD

config MODVERSIONS
bool "Module versioning support"
depends on BROKEN
help
Usually, you have to use modules compiled with your kernel.
Saying Y here makes it sometimes possible to use modules
Expand Down
5 changes: 3 additions & 2 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,8 +1301,9 @@ static int check_version(Elf_Shdr *sechdrs,
goto bad_version;
}

pr_warn("%s: no symbol version for %s\n", mod->name, symname);
return 0;
/* Broken toolchain. Warn once, then let it go.. */
pr_warn_once("%s: no symbol version for %s\n", mod->name, symname);
return 1;

bad_version:
pr_warn("%s: disagrees about version of symbol %s\n",
Expand Down

0 comments on commit faaae2a

Please sign in to comment.