1
0
Fork 0
alistair23-linux/scripts/mod
Jessica Yu eba75a365f modpost: move the namespace field in Module.symvers last
commit 5190044c29 upstream.

In order to preserve backwards compatability with kmod tools, we have to
move the namespace field in Module.symvers last, as the depmod -e -E
option looks at the first three fields in Module.symvers to check symbol
versions (and it's expected they stay in the original order of crc,
symbol, module).

In addition, update an ancient comment above read_dump() in modpost that
suggested that the export type field in Module.symvers was optional. I
suspect that there were historical reasons behind that comment that are
no longer accurate. We have been unconditionally printing the export
type since 2.6.18 (commit bd5cbcedf4), which is over a decade ago now.

Fix up read_dump() to treat each field as non-optional. I suspect the
original read_dump() code treated the export field as optional in order
to support pre <= 2.6.18 Module.symvers (which did not have the export
type field). Note that although symbol namespaces are optional, the
field will not be omitted from Module.symvers if a symbol does not have
a namespace. In this case, the field will simply be empty and the next
delimiter or end of line will follow.

Cc: stable@vger.kernel.org
Fixes: cb9b55d21f ("modpost: add support for symbol namespaces")
Tested-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 08:25:55 +01:00
..
.gitignore kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
Makefile kbuild: move modpost out of 'scripts' target 2018-12-01 23:09:34 +09:00
devicetable-offsets.c platform-drivers-x86 for v5.1-1 2019-03-10 13:16:37 -07:00
empty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file2alias.c modpost: add guid_t type definition 2019-09-04 22:55:42 +09:00
mk_elfconfig.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
modpost.c modpost: move the namespace field in Module.symvers last 2020-03-25 08:25:55 +01:00
modpost.h symbol namespaces: revert to previous __ksymtab name scheme 2019-10-18 15:32:52 +02:00
sumversion.c kbuild: remove the first line of *.mod files 2019-07-18 02:19:31 +09:00