2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-13 15:03:39 -08:00
|
|
|
|
2020-01-05 00:36:51 +09:00
|
|
|
|
2022-05-30 18:01:39 +09:00
|
|
|
|
2008-02-13 15:03:39 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-08-11 00:42:26 -07:00
|
|
|
|
2013-04-04 17:37:38 +10:30
|
|
|
|
2021-08-28 18:50:59 +09:00
|
|
|
|
2013-09-23 15:23:54 +09:30
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
2009-11-07 21:03:54 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2006-09-07 13:08:54 -07:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2022-04-05 20:33:53 +09:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2013-09-23 15:23:54 +09:30
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2020-03-06 17:02:06 +01:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
|
|
|
|
|
kbuild: fix false-positive modpost warning when all symbols are trimmed
Nathan reports that the mips defconfig emits the following warning:
WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.
This false-positive happens when CONFIG_TRIM_UNUSED_KSYMS is enabled,
but no CONFIG option is set to 'm'.
Commit a0590473c5e6 ("nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default")
turned the last 'm' into 'y' for the mips defconfig, and uncovered
this issue.
In this case, the module feature itself is enabled, but we have no
module to build. As a result, CONFIG_TRIM_UNUSED_KSYMS drops all the
instances of EXPORT_SYMBOL. Then, modpost wrongly assumes vmlinux is
missing because vmlinux.symvers is empty. (As another false-positive
case, you can create a module that does not use any symbol of vmlinux).
The current behavior is to entirely suppress the unresolved symbol
warnings when vmlinux is missing just because there are too many.
I found the origin of this code in the historical git tree. [1]
If this is a matter of noisiness, I think modpost can display the
first 10 warnings, and the number of suppressed warnings at the end.
You will get a bit noisier logs when you run 'make modules' without
vmlinux, but such warnings are better to show because you never know
the resulting modules are actually loadable or not.
This commit changes the following:
- If any of input *.symver files is missing, pass -w option to let
the module build keep going with warnings instead of errors.
- If there are too many (10+) unresolved symbol warnings, show only
the first 10, and also the number of suppressed warnings.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=1cc0e0529569bf6a94f6d49770aa6d4b599d2c46
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-03-26 03:54:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-30 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-06 17:02:05 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-06 17:02:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-03-06 17:02:05 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-07 05:35:32 -06:00
|
|
|
|
2020-03-06 17:02:05 +01:00
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
|
|
|
|
|
2006-10-07 05:35:32 -06:00
|
|
|
|
|
|
|
|
|
2021-08-28 18:50:59 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2020-03-06 17:02:05 +01:00
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
2020-06-01 14:57:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:17 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-07-01 08:18:27 +02:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:17 +09:00
|
|
|
|
2020-07-01 08:18:27 +02:00
|
|
|
|
2020-06-01 14:57:17 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2020-07-26 23:44:19 +02:00
|
|
|
|
2020-07-01 08:18:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:10 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-05-09 18:50:40 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:10 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-01 17:40:10 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-05-30 18:01:38 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2022-05-30 18:01:38 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:15 +09:00
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2022-05-30 18:01:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modpost: change mod->gpl_compatible to bool type
Currently, mod->gpl_compatible is tristate; it is set to -1 by default,
then to 1 or 0 when MODULE_LICENSE() is found.
Maybe, -1 was chosen to represent the 'unknown' license, but it is not
useful.
The current code:
if (!mod->gpl_compatible)
check_for_gpl_usage(exp->export, basename, exp->name);
... only cares whether gpl_compatible is zero or not.
Change it to a bool type with the initial value 'true', which has no
functional change.
The default value should be 'true' instead of 'false'.
Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() into
error"), unknown module license is an error.
The error message, "missing MODULE_LICENSE()" is enough to explain the
issue. It is not sensible to show another message, "GPL-incompatible
module ... uses GPL-only symbol".
Add comments to explain this.
While I was here, I renamed gpl_compatible to is_gpl_compatible for
clarification, and also slightly refactored the code.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-05-01 17:40:08 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:10 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:15 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
modpost: fix broken sym->namespace for external module builds
Currently, external module builds produce tons of false-positives:
WARNING: module <mod> uses symbol <sym> from namespace <ns>, but does not import it.
Here, the <ns> part shows a random string.
When you build external modules, the symbol info of vmlinux and
in-kernel modules are read from $(objtree)/Module.symvers, but
read_dump() is buggy in multiple ways:
[1] When the modpost is run for vmlinux and in-kernel modules,
sym_extract_namespace() allocates memory for the namespace. On the
other hand, read_dump() does not, then sym->namespace will point to
somewhere in the line buffer of get_next_line(). The data in the
buffer will be replaced soon, and sym->namespace will end up with
pointing to unrelated data. As a result, check_exports() will show
random strings in the warning messages.
[2] When there is no namespace, sym_extract_namespace() returns NULL.
On the other hand, read_dump() sets namespace to an empty string "".
(but, it will be later replaced with unrelated data due to bug [1].)
The check_exports() shows a warning unless exp->namespace is NULL,
so every symbol read from read_dump() emits the warning, which is
mostly false positive.
To address [1], sym_add_exported() calls strdup() for s->namespace.
The namespace from sym_extract_namespace() must be freed to avoid
memory leak.
For [2], I changed the if-conditional in check_exports().
This commit also fixes sym_add_exported() to set s->namespace correctly
when the symbol is preloaded.
Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
2019-10-03 16:58:22 +09:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
modpost,fixdep: Replace zero-length array with flexible-array
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.
Also, notice that, dynamic memory allocations won't be affected by
this change:
"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]
sizeof(flexible-array-member) triggers a warning because flexible array
members have incomplete type[1]. There are some instances of code in
which the sizeof operator is being incorrectly/erroneously applied to
zero-length arrays and the result is zero. Such instances may be hiding
some bugs. So, this work (flexible-array member conversions) will also
help to get completely rid of those sorts of issues.
This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-05-07 13:56:01 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 11:22:19 +05:30
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:19 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-27 19:01:51 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:19 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:19 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:11 +09:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:19 +09:00
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:11 +09:00
|
|
|
|
|
|
|
|
|
2022-05-12 01:45:04 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2022-05-12 01:45:04 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-12 01:45:04 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-25 04:07:56 +09:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2022-04-25 04:07:56 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-29 21:38:09 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
|
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-25 14:47:04 +09:00
|
|
|
|
|
|
|
|
|
2017-09-06 16:19:05 -07:00
|
|
|
|
2020-03-18 18:34:16 +08:00
|
|
|
|
2017-09-06 16:19:05 -07:00
|
|
|
|
2019-11-15 02:42:21 +09:00
|
|
|
|
2017-09-06 16:19:05 -07:00
|
|
|
|
2011-07-14 08:51:16 +02:00
|
|
|
|
2022-07-20 01:53:00 +09:00
|
|
|
|
2019-11-15 02:42:21 +09:00
|
|
|
|
2020-05-25 14:47:04 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 02:42:21 +09:00
|
|
|
|
2020-05-25 14:47:05 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 02:42:21 +09:00
|
|
|
|
2022-07-31 02:36:34 +09:00
|
|
|
|
2020-05-25 14:47:05 +09:00
|
|
|
|
2022-07-31 02:36:34 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-25 14:47:05 +09:00
|
|
|
|
2019-11-15 02:42:21 +09:00
|
|
|
|
|
|
|
|
|
2011-07-14 08:51:16 +02:00
|
|
|
|
|
|
|
|
|
2019-10-18 10:31:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modpost: rename merror() to error()
The log function names, warn(), merror(), fatal() are inconsistent.
Commit 2a11665945d5 ("kbuild: distinguish between errors and warnings
in modpost") intentionally chose merror() to avoid the conflict with
the library function error(). See man page of error(3).
But, we are already causing the conflict with warn() because it is also
a library function. See man page of warn(3). err() would be a problem
for the same reason.
The common technique to work around name conflicts is to use macros.
For example:
/* in a header */
#define error(fmt, ...) __error(fmt, ##__VA_ARGS__)
#define warn(fmt, ...) __warn(fmt, ##__VA_ARGS__)
/* function definition */
void __error(const char *fmt, ...)
{
<our implementation>
}
void __warn(const char *fmt, ...)
{
<our implementation>
}
In this way, we can implement our own warn() and error(), still we can
include <error.h> and <err.h> with no problem.
And, commit 93c95e526a4e ("modpost: rework and consolidate logging
interface") already did that.
Since the log functions are all macros, we can use error() without
causing "conflicting types" errors.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-12-01 19:34:14 +09:00
|
|
|
|
|
|
|
|
|
2019-10-18 10:31:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-05 20:33:54 +09:00
|
|
|
|
2019-10-18 10:31:40 +01:00
|
|
|
|
|
|
|
|
|
2019-10-18 10:31:41 +01:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:18 +09:00
|
|
|
|
2022-05-01 17:40:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-11-15 02:42:26 +09:00
|
|
|
|
2022-05-01 17:40:19 +09:00
|
|
|
|
2019-11-15 02:42:26 +09:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2022-05-01 17:40:18 +09:00
|
|
|
|
2022-05-01 17:40:19 +09:00
|
|
|
|
2022-05-01 17:40:18 +09:00
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:31 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-05-23 22:28:49 +09:30
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 22:28:49 +09:30
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-05-23 22:28:49 +09:30
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 22:28:49 +09:30
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:31 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-26 15:33:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-02-26 15:33:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-23 15:23:54 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-06-24 23:46:54 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-02-26 15:33:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-05-03 22:02:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-20 01:52:59 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-08-27 12:15:07 +02:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:31 +09:00
|
|
|
|
|
|
|
|
|
2007-08-27 12:15:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 16:55:27 -06:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 16:55:27 -06:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2009-05-03 22:02:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
2006-06-08 22:12:53 -07:00
|
|
|
|
2009-02-06 00:48:02 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-02-06 00:48:02 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-26 15:33:52 +01:00
|
|
|
|
|
|
|
|
|
2006-06-08 22:12:53 -07:00
|
|
|
|
|
|
|
|
|
2009-02-06 00:48:02 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
modpost: remove useless export_from_sec()
With commit 1743694eb235 ("modpost: stop symbol preloading for
modversion CRC") applied, now export_from_sec() is useless.
handle_symbol() is called for every symbol in the ELF.
When 'symname' does not start with "__ksymtab", export_from_sec() is
called, and the returned value is stored in 'export'.
It is used in the last part of handle_symbol():
if (strstarts(symname, "__ksymtab_")) {
name = symname + strlen("__ksymtab_");
sym_add_exported(name, mod, export);
}
'export' is used only when 'symname' starts with "__ksymtab_".
So, the value returned by export_from_sec() is never used.
Remove useless export_from_sec(). This makes further cleanups possible.
I put the temporary code:
export = export_unknown;
Otherwise, I would get the compiler warning:
warning: 'export' may be used uninitialized in this function [-Wmaybe-uninitialized]
This is apparently false positive because
if (strstarts(symname, "__ksymtab_")
... is a stronger condition than:
if (strstarts(symname, "__ksymtab")
Anyway, this part will be cleaned up by the next commit.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-04-05 20:33:51 +09:00
|
|
|
|
2006-06-08 22:12:53 -07:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 16:55:27 -06:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2006-01-28 16:57:26 +01:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 16:55:27 -06:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2011-05-19 16:55:27 -06:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-26 15:33:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-12 15:02:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 16:23:45 +09:00
|
|
|
|
2008-06-12 15:02:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-12 15:02:55 +02:00
|
|
|
|
2010-06-29 20:08:42 +00:00
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-15 20:52:22 +11:00
|
|
|
|
2010-06-29 20:08:42 +00:00
|
|
|
|
2022-03-06 20:56:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-12 15:02:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 02:42:23 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:38 +09:00
|
|
|
|
2014-02-08 09:01:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-12 15:02:55 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-08-19 13:44:57 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2018-08-15 12:30:38 -07:00
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2022-05-01 17:40:11 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:38 +09:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2022-04-05 20:33:52 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-05-09 16:23:45 +09:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2018-05-09 16:23:45 +09:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:37 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:37 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-05-09 18:50:37 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:37 +09:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:37 +09:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-06 21:51:18 +01:00
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
|
|
|
|
|
2022-05-30 18:01:39 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2022-05-30 18:01:39 +09:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2022-05-30 18:01:39 +09:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2022-05-30 18:01:39 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2022-05-30 18:01:39 +09:00
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
modpost: add PATTERNS() helper macro
This will be useful to define a NULL-terminated array inside a function
call.
Currently, string arrays passed to match() are defined in separate
places:
static const char *const init_sections[] = { ALL_INIT_SECTIONS, NULL };
static const char *const text_sections[] = { ALL_TEXT_SECTIONS, NULL };
static const char *const optim_symbols[] = { "*.constprop.*", NULL };
...
/* Check for pattern 5 */
if (match(fromsec, text_sections) &&
match(tosec, init_sections) &&
match(fromsym, optim_symbols))
return 0;
With the new helper macro, you can list the patterns directly in the
function call, like this:
/* Check for pattern 5 */
if (match(fromsec, PATTERNS(ALL_TEXT_SECTIONS)) &&
match(tosec, PATTERNS(ALL_INIT_SECTIONS)) &&
match(fromsym, PATTERNS("*.contprop.*")))
return 0;
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-08-01 18:39:00 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2014-08-27 20:28:53 +09:30
|
|
|
|
2009-05-04 13:05:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-15 17:11:22 -08:00
|
|
|
|
2018-03-08 09:48:46 +00:00
|
|
|
|
2009-05-04 13:05:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-17 05:44:38 +04:00
|
|
|
|
|
|
|
|
|
2013-01-21 17:18:57 +10:30
|
|
|
|
|
|
|
|
|
2015-10-26 19:51:46 +10:30
|
|
|
|
|
|
|
|
|
2014-02-08 09:01:17 +01:00
|
|
|
|
2017-03-01 12:04:44 -06:00
|
|
|
|
2009-05-04 13:05:26 +02:00
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2008-01-28 20:13:13 +01:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
2008-01-28 20:13:13 +01:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
2008-01-28 20:13:13 +01:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
2014-06-10 19:08:13 +09:00
|
|
|
|
2008-01-28 20:13:13 +01:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-28 20:13:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2014-07-27 07:28:01 +09:30
|
|
|
|
|
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2014-07-27 07:28:01 +09:30
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2014-07-27 07:28:01 +09:30
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2014-07-27 07:28:01 +09:30
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2012-06-03 20:48:17 +02:00
|
|
|
|
2014-07-27 07:28:01 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-03 20:48:17 +02:00
|
|
|
|
2013-06-19 19:30:48 -04:00
|
|
|
|
|
|
|
|
|
2010-01-29 12:04:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2014-07-27 07:28:01 +09:30
|
|
|
|
2015-04-13 20:42:52 +09:30
|
|
|
|
2020-03-09 22:47:17 +01:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
2015-07-08 17:07:41 -04:00
|
|
|
|
powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto
Using asm goto in __WARN_FLAGS() and WARN_ON() allows more
flexibility to GCC.
For that add an entry to the exception table so that
program_check_exception() knowns where to resume execution
after a WARNING.
Here are two exemples. The first one is done on PPC32 (which
benefits from the previous patch), the second is on PPC64.
unsigned long test(struct pt_regs *regs)
{
int ret;
WARN_ON(regs->msr & MSR_PR);
return regs->gpr[3];
}
unsigned long test9w(unsigned long a, unsigned long b)
{
if (WARN_ON(!b))
return 0;
return a / b;
}
Before the patch:
000003a8 <test>:
3a8: 81 23 00 84 lwz r9,132(r3)
3ac: 71 29 40 00 andi. r9,r9,16384
3b0: 40 82 00 0c bne 3bc <test+0x14>
3b4: 80 63 00 0c lwz r3,12(r3)
3b8: 4e 80 00 20 blr
3bc: 0f e0 00 00 twui r0,0
3c0: 80 63 00 0c lwz r3,12(r3)
3c4: 4e 80 00 20 blr
0000000000000bf0 <.test9w>:
bf0: 7c 89 00 74 cntlzd r9,r4
bf4: 79 29 d1 82 rldicl r9,r9,58,6
bf8: 0b 09 00 00 tdnei r9,0
bfc: 2c 24 00 00 cmpdi r4,0
c00: 41 82 00 0c beq c0c <.test9w+0x1c>
c04: 7c 63 23 92 divdu r3,r3,r4
c08: 4e 80 00 20 blr
c0c: 38 60 00 00 li r3,0
c10: 4e 80 00 20 blr
After the patch:
000003a8 <test>:
3a8: 81 23 00 84 lwz r9,132(r3)
3ac: 71 29 40 00 andi. r9,r9,16384
3b0: 40 82 00 0c bne 3bc <test+0x14>
3b4: 80 63 00 0c lwz r3,12(r3)
3b8: 4e 80 00 20 blr
3bc: 0f e0 00 00 twui r0,0
0000000000000c50 <.test9w>:
c50: 7c 89 00 74 cntlzd r9,r4
c54: 79 29 d1 82 rldicl r9,r9,58,6
c58: 0b 09 00 00 tdnei r9,0
c5c: 7c 63 23 92 divdu r3,r3,r4
c60: 4e 80 00 20 blr
c70: 38 60 00 00 li r3,0
c74: 4e 80 00 20 blr
In the first exemple, we see GCC doesn't need to duplicate what
happens after the trap.
In the second exemple, we see that GCC doesn't need to emit a test
and a branch in the likely path in addition to the trap.
We've got some WARN_ON() in .softirqentry.text section so it needs
to be added in the OTHER_TEXT_SECTIONS in modpost.c
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/389962b1b702e3c78d169e59bcfac56282889173.1618331882.git.christophe.leroy@csgroup.eu
2021-04-13 16:38:10 +00:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2009-03-12 10:58:33 +00:00
|
|
|
|
|
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2009-03-12 10:58:33 +00:00
|
|
|
|
|
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
2014-08-27 20:28:53 +09:30
|
|
|
|
|
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
|
|
|
|
|
2014-08-27 20:28:53 +09:30
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
2015-04-20 10:20:40 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
2014-08-27 20:28:53 +09:30
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
2014-08-27 20:28:53 +09:30
|
|
|
|
|
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
2015-04-20 10:20:40 +09:30
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:55:15 +09:30
|
|
|
|
2021-03-26 11:22:19 +05:30
|
|
|
|
2015-04-13 20:55:15 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 11:22:19 +05:30
|
|
|
|
2015-04-13 20:55:15 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-27 20:28:53 +09:30
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2010-01-30 21:14:23 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 21:14:23 +01:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2013-06-19 19:30:48 -04:00
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2010-01-29 12:04:26 +01:00
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2013-06-19 19:30:48 -04:00
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2010-01-29 12:04:26 +01:00
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-20 20:07:28 +01:00
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2012-06-03 20:48:17 +02:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2012-06-03 20:48:17 +02:00
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
2022-06-11 03:32:30 +09:00
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
2010-01-30 20:52:50 +01:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 16:56:20 +01:00
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-16 13:16:41 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-08 09:48:46 +00:00
|
|
|
|
|
|
|
|
|
2015-04-16 13:16:41 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-24 01:46:25 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:41:04 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2010-01-30 16:56:20 +01:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
|
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
|
|
|
|
|
2007-05-17 20:14:48 +02:00
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-05 00:16:26 +01:00
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2010-08-11 23:04:16 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-11 01:52:44 +01:00
|
|
|
|
2009-04-26 11:17:42 +02:00
|
|
|
|
2007-02-26 17:49:06 +01:00
|
|
|
|
2007-06-03 00:41:22 +02:00
|
|
|
|
2007-01-11 01:52:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-26 17:49:06 +01:00
|
|
|
|
2015-04-20 10:20:40 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modpost: skip ELF local symbols during section mismatch check
During development of a serial console driver with a gcc 8.2.0
toolchain for RISC-V, the following modpost warning appeared:
----
WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
The variable .LANCHOR1 references
the function __init sifive_serial_console_setup()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
----
".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
anchor generation code:
https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473
This was verified by compiling the kernel with -fno-section-anchors
and observing that the ".LANCHOR1" ELF local symbol disappeared, and
modpost no longer warned about the section mismatch. The serial
driver code idiom triggering the warning is standard Linux serial
driver practice that has a specific whitelist inclusion in modpost.c.
I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
useful for modpost to report section mismatch warnings caused by ELF
local symbols by default. Local symbols have compiler-generated
names, and thus bypass modpost's whitelisting algorithm, which relies
on the presence of a non-autogenerated symbol name. This increases
the likelihood that false positive warnings will be generated (as in
the above case).
Thus, disable section mismatch reporting on ELF local symbols. The
rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
ARM binutils leaking ELF local symbols") and of similar code already
present in modpost.c:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256
This third version of the patch implements a suggestion from Masahiro
Yamada <yamada.masahiro@socionext.com> to restructure the code as an
additional pattern matching step inside secref_whitelist(), and
further improves the patch description.
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-21 13:14:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
2010-01-30 20:52:50 +01:00
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
|
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:38 +09:00
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
2010-08-11 23:04:16 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:38 +09:00
|
|
|
|
2010-08-11 23:04:16 -06:00
|
|
|
|
|
|
|
|
|
2022-08-01 18:39:02 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
2007-02-26 17:49:06 +01:00
|
|
|
|
2008-01-20 10:43:27 +01:00
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2007-02-26 17:49:06 +01:00
|
|
|
|
2007-06-03 00:41:22 +02:00
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
|
|
|
|
|
2007-02-26 17:49:06 +01:00
|
|
|
|
2015-04-20 10:20:40 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modpost: skip ELF local symbols during section mismatch check
During development of a serial console driver with a gcc 8.2.0
toolchain for RISC-V, the following modpost warning appeared:
----
WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
The variable .LANCHOR1 references
the function __init sifive_serial_console_setup()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
----
".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
anchor generation code:
https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473
This was verified by compiling the kernel with -fno-section-anchors
and observing that the ".LANCHOR1" ELF local symbol disappeared, and
modpost no longer warned about the section mismatch. The serial
driver code idiom triggering the warning is standard Linux serial
driver practice that has a specific whitelist inclusion in modpost.c.
I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
useful for modpost to report section mismatch warnings caused by ELF
local symbols by default. Local symbols have compiler-generated
names, and thus bypass modpost's whitelisting algorithm, which relies
on the presence of a non-autogenerated symbol name. This increases
the likelihood that false positive warnings will be generated (as in
the above case).
Thus, disable section mismatch reporting on ELF local symbols. The
rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
ARM binutils leaking ELF local symbols") and of similar code already
present in modpost.c:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256
This third version of the patch implements a suggestion from Masahiro
Yamada <yamada.masahiro@socionext.com> to restructure the code as an
additional pattern matching step inside secref_whitelist(), and
further improves the patch description.
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-21 13:14:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
|
|
|
|
|
2018-10-23 15:15:35 -07:00
|
|
|
|
|
|
|
|
|
2022-05-24 01:46:22 +09:00
|
|
|
|
|
|
|
|
|
2018-10-23 15:15:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 21:04:34 +01:00
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 21:04:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
|
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
|
|
|
|
|
2018-10-23 15:15:35 -07:00
|
|
|
|
|
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
|
|
|
|
|
2008-01-18 21:04:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
2008-01-18 21:04:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-19 11:53:35 +01:00
|
|
|
|
|
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
2006-03-05 12:02:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
2008-01-22 21:44:32 +01:00
|
|
|
|
|
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
2008-01-22 21:44:32 +01:00
|
|
|
|
|
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
2007-02-20 13:58:16 -08:00
|
|
|
|
|
|
|
|
|
2022-05-24 01:46:26 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
2008-01-22 21:44:32 +01:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-06 21:51:18 +01:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:43:34 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
2006-02-26 22:18:11 +01:00
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2010-01-30 16:56:20 +01:00
|
|
|
|
|
|
|
|
|
2014-06-10 19:08:13 +09:00
|
|
|
|
|
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2008-02-02 18:57:18 +01:00
|
|
|
|
|
|
|
|
|
2010-01-30 16:56:20 +01:00
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
2010-01-30 16:35:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
|
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
|
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
2008-01-24 21:12:37 +01:00
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
|
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:43:45 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-01 18:38:59 +09:00
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-16 13:05:36 +09:30
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-16 13:05:36 +09:30
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
2015-04-16 13:05:36 +09:30
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
2015-04-16 13:03:32 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-16 13:05:36 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-01 13:50:45 +09:00
|
|
|
|
2015-04-13 20:52:53 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-16 13:21:29 +00:00
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
2010-01-30 16:56:20 +01:00
|
|
|
|
2015-04-13 20:43:17 +09:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
2020-05-25 14:47:04 +09:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-14 21:58:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-14 22:41:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2007-07-16 22:39:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2014-06-10 19:08:13 +09:00
|
|
|
|
2007-07-16 22:39:35 +02:00
|
|
|
|
|
|
|
|
|
2012-02-14 21:58:56 +01:00
|
|
|
|
|
|
|
|
|
2014-02-14 22:41:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 22:39:35 +02:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2014-06-10 19:08:13 +09:00
|
|
|
|
|
|
|
|
|
2007-07-16 22:39:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2007-05-22 18:27:39 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 19:22:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2014-06-10 19:08:13 +09:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
2022-07-31 02:36:35 +09:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2008-01-28 20:13:13 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-18 19:22:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2015-04-16 13:05:36 +09:30
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-10 19:08:13 +09:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
2022-07-31 02:36:35 +09:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-23 19:54:27 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2015-04-16 13:05:36 +09:30
|
|
|
|
|
|
|
|
|
2008-01-23 21:13:50 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tree-wide: fix comment/printk typos
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-01 15:38:34 -04:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
2008-07-29 22:33:44 -07:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-24 01:46:23 +09:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
2010-07-29 01:47:53 +02:00
|
|
|
|
2009-04-23 16:49:33 -04:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2008-01-18 21:49:29 +01:00
|
|
|
|
2008-01-13 22:21:31 +01:00
|
|
|
|
2006-02-17 22:42:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-08 09:01:12 +01:00
|
|
|
|
|
|
|
|
|
2014-07-27 07:27:01 +09:30
|
|
|
|
2014-02-08 09:01:12 +01:00
|
|
|
|
2014-07-27 07:27:01 +09:30
|
|
|
|
|
|
|
|
|
2022-05-24 17:27:18 +02:00
|
|
|
|
2014-02-08 09:01:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-09 18:50:40 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-26 15:33:52 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-30 18:01:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:29 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-30 18:01:38 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:26 +09:00
|
|
|
|
2020-06-01 14:57:16 +09:00
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:16 +09:00
|
|
|
|
2020-06-01 14:57:16 +09:00
|
|
|
|
modpost: change mod->gpl_compatible to bool type
Currently, mod->gpl_compatible is tristate; it is set to -1 by default,
then to 1 or 0 when MODULE_LICENSE() is found.
Maybe, -1 was chosen to represent the 'unknown' license, but it is not
useful.
The current code:
if (!mod->gpl_compatible)
check_for_gpl_usage(exp->export, basename, exp->name);
... only cares whether gpl_compatible is zero or not.
Change it to a bool type with the initial value 'true', which has no
functional change.
The default value should be 'true' instead of 'false'.
Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() into
error"), unknown module license is an error.
The error message, "missing MODULE_LICENSE()" is enough to explain the
issue. It is not sensible to show another message, "GPL-incompatible
module ... uses GPL-only symbol".
Add comments to explain this.
While I was here, I renamed gpl_compatible to is_gpl_compatible for
clarification, and also slightly refactored the code.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-05-01 17:40:08 +09:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:16 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:16 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-02-08 09:01:12 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-11-15 02:42:23 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-08-01 09:06:57 +03:00
|
|
|
|
2019-10-18 10:31:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-15 02:42:24 +09:00
|
|
|
|
2019-10-18 10:31:42 +01:00
|
|
|
|
|
|
|
|
|
2022-04-05 20:33:54 +09:00
|
|
|
|
2019-10-18 10:31:42 +01:00
|
|
|
|
|
|
|
|
|
2022-05-24 01:46:23 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-06-01 14:57:26 +09:00
|
|
|
|
2020-06-01 14:57:16 +09:00
|
|
|
|
|
|
|
|
|
2021-08-28 18:50:59 +09:00
|
|
|
|
2020-06-01 14:57:16 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:11 +09:00
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-04-04 17:37:38 +10:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-03 16:46:04 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-16 23:04:08 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-16 23:04:08 -08:00
|
|
|
|
2018-08-15 12:30:38 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2006-06-09 20:45:06 -07:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
2022-04-25 04:07:48 +09:00
|
|
|
|
kbuild: fix false-positive modpost warning when all symbols are trimmed
Nathan reports that the mips defconfig emits the following warning:
WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.
This false-positive happens when CONFIG_TRIM_UNUSED_KSYMS is enabled,
but no CONFIG option is set to 'm'.
Commit a0590473c5e6 ("nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default")
turned the last 'm' into 'y' for the mips defconfig, and uncovered
this issue.
In this case, the module feature itself is enabled, but we have no
module to build. As a result, CONFIG_TRIM_UNUSED_KSYMS drops all the
instances of EXPORT_SYMBOL. Then, modpost wrongly assumes vmlinux is
missing because vmlinux.symvers is empty. (As another false-positive
case, you can create a module that does not use any symbol of vmlinux).
The current behavior is to entirely suppress the unresolved symbol
warnings when vmlinux is missing just because there are too many.
I found the origin of this code in the historical git tree. [1]
If this is a matter of noisiness, I think modpost can display the
first 10 warnings, and the number of suppressed warnings at the end.
You will get a bit noisier logs when you run 'make modules' without
vmlinux, but such warnings are better to show because you never know
the resulting modules are actually loadable or not.
This commit changes the following:
- If any of input *.symver files is missing, pass -w option to let
the module build keep going with warnings instead of errors.
- If there are too many (10+) unresolved symbol warnings, show only
the first 10, and also the number of suppressed warnings.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=1cc0e0529569bf6a94f6d49770aa6d4b599d2c46
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-03-26 03:54:11 +09:00
|
|
|
|
2020-03-06 17:02:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
2018-11-23 16:57:23 +09:00
|
|
|
|
2022-04-25 04:07:48 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-25 04:07:49 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-09 20:45:06 -07:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
2006-07-01 11:44:23 +02:00
|
|
|
|
|
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2020-03-06 17:02:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-09-06 11:32:28 +01:00
|
|
|
|
|
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2006-06-09 21:53:55 +02:00
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
2017-06-30 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
modpost: rename merror() to error()
The log function names, warn(), merror(), fatal() are inconsistent.
Commit 2a11665945d5 ("kbuild: distinguish between errors and warnings
in modpost") intentionally chose merror() to avoid the conflict with
the library function error(). See man page of error(3).
But, we are already causing the conflict with warn() because it is also
a library function. See man page of warn(3). err() would be a problem
for the same reason.
The common technique to work around name conflicts is to use macros.
For example:
/* in a header */
#define error(fmt, ...) __error(fmt, ##__VA_ARGS__)
#define warn(fmt, ...) __warn(fmt, ##__VA_ARGS__)
/* function definition */
void __error(const char *fmt, ...)
{
<our implementation>
}
void __warn(const char *fmt, ...)
{
<our implementation>
}
In this way, we can implement our own warn() and error(), still we can
include <error.h> and <err.h> with no problem.
And, commit 93c95e526a4e ("modpost: rework and consolidate logging
interface") already did that.
Since the log functions are all macros, we can use error() without
causing "conflicting types" errors.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-12-01 19:34:14 +09:00
|
|
|
|
2017-06-30 22:07:03 +08:00
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-03-20 14:53:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-19 18:55:06 +03:00
|
|
|
|
2020-03-20 14:53:41 +00:00
|
|
|
|
2021-04-01 16:27:23 -07:00
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-05 17:49:37 -07:00
|
|
|
|
2021-04-01 16:27:23 -07:00
|
|
|
|
2018-07-05 17:49:37 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-04-21 15:35:27 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-10-23 10:57:58 +10:30
|
|
|
|
2020-10-21 19:36:07 -07:00
|
|
|
|
2012-04-25 11:10:15 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-25 11:10:15 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-04-25 11:10:15 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-25 11:10:15 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-05-05 16:22:32 +09:00
|
|
|
|
2011-10-24 15:12:28 +02:00
|
|
|
|
|
|
|
|
|
2022-05-05 16:22:32 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-25 15:50:28 -08:00
|
|
|
|
2022-05-05 16:22:32 +09:00
|
|
|
|
2008-09-24 14:46:44 -07:00
|
|
|
|
2022-07-08 12:48:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-24 14:46:44 -07:00
|
|
|
|
|
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
|
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
modpost: fix module versioning when a symbol lacks valid CRC
Since commit 7b4537199a4a ("kbuild: link symbol CRCs at final link,
removing CONFIG_MODULE_REL_CRCS"), module versioning is broken on
some architectures. Loading a module fails with "disagrees about
version of symbol module_layout".
On such architectures (e.g. ARCH=sparc build with sparc64_defconfig),
modpost shows a warning, like follows:
WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
Is "_mcount" prototyped in <asm/asm-prototypes.h>?
Previously, it was a harmless warning (CRC check was just skipped),
but now wrong CRCs are used for comparison because invalid CRCs are
just skipped.
$ sparc64-linux-gnu-nm -n vmlinux
[snip]
0000000000c2cea0 r __ksymtab__kstrtol
0000000000c2ceb8 r __ksymtab__kstrtoul
0000000000c2ced0 r __ksymtab__local_bh_enable
0000000000c2cee8 r __ksymtab__mcount
0000000000c2cf00 r __ksymtab__printk
0000000000c2cf18 r __ksymtab__raw_read_lock
0000000000c2cf30 r __ksymtab__raw_read_lock_bh
[snip]
0000000000c53b34 D __crc__kstrtol
0000000000c53b38 D __crc__kstrtoul
0000000000c53b3c D __crc__local_bh_enable
0000000000c53b40 D __crc__printk
0000000000c53b44 D __crc__raw_read_lock
0000000000c53b48 D __crc__raw_read_lock_bh
Please notice __crc__mcount is missing here.
When the module subsystem looks up a CRC that comes after, it results
in reading out a wrong address. For example, when __crc__printk is
needed, the module subsystem reads 0xc53b44 instead of 0xc53b40.
All CRC entries must be output for correct index accessing. Invalid
CRCs will be unused, but are needed to keep the one-to-one mapping
between __ksymtab_* and __crc_*.
The best is to fix all modpost warnings, but several warnings are still
remaining on less popular architectures.
Fixes: 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS")
Reported-by: matoro <matoro_mailinglist_kernel@matoro.tk>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: matoro <matoro_mailinglist_kernel@matoro.tk>
2022-08-09 23:11:17 +09:00
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-04-25 04:07:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 19:36:07 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-01-28 16:57:26 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-08 15:16:20 +09:30
|
|
|
|
modpost: rename merror() to error()
The log function names, warn(), merror(), fatal() are inconsistent.
Commit 2a11665945d5 ("kbuild: distinguish between errors and warnings
in modpost") intentionally chose merror() to avoid the conflict with
the library function error(). See man page of error(3).
But, we are already causing the conflict with warn() because it is also
a library function. See man page of warn(3). err() would be a problem
for the same reason.
The common technique to work around name conflicts is to use macros.
For example:
/* in a header */
#define error(fmt, ...) __error(fmt, ##__VA_ARGS__)
#define warn(fmt, ...) __warn(fmt, ##__VA_ARGS__)
/* function definition */
void __error(const char *fmt, ...)
{
<our implementation>
}
void __warn(const char *fmt, ...)
{
<our implementation>
}
In this way, we can implement our own warn() and error(), still we can
include <error.h> and <err.h> with no problem.
And, commit 93c95e526a4e ("modpost: rework and consolidate logging
interface") already did that.
Since the log functions are all macros, we can use error() without
causing "conflicting types" errors.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-12-01 19:34:14 +09:00
|
|
|
|
|
|
|
|
|
2015-08-08 15:16:20 +09:30
|
|
|
|
|
|
|
|
|
2018-05-09 16:23:45 +09:00
|
|
|
|
2013-03-18 19:38:56 +10:30
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-23 16:57:21 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-23 16:57:21 +09:00
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2018-11-23 16:57:21 +09:00
|
|
|
|
2020-06-01 14:57:26 +09:00
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-09-09 20:34:22 +09:00
|
|
|
|
2022-05-01 17:40:12 +09:00
|
|
|
|
2007-02-26 19:46:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
|
|
|
|
|
2007-02-26 19:46:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-09-09 20:34:22 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-25 04:07:46 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:12 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:12 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-05 16:22:33 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
2022-05-05 16:22:33 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-08 22:12:53 -07:00
|
|
|
|
2020-03-11 18:01:20 +01:00
|
|
|
|
2006-06-08 22:12:53 -07:00
|
|
|
|
2020-06-01 14:57:05 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-06-01 14:57:20 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-06-01 14:57:20 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:20 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-11 18:01:20 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-01-28 22:15:55 +01:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-11 18:01:20 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-03-11 18:01:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
|
|
|
|
|
2022-05-30 18:01:38 +09:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2022-05-13 20:39:21 +09:00
|
|
|
|
2019-10-18 10:31:41 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-06-01 14:57:20 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:20 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:15 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2022-05-01 17:40:15 +09:00
|
|
|
|
2022-05-09 04:06:19 +09:00
|
|
|
|
2022-05-01 17:40:15 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:12 +09:00
|
|
|
|
2016-08-02 21:43:01 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:10 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
|
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2022-05-01 17:40:14 +09:00
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2019-11-07 00:19:59 +09:00
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-11-07 00:19:59 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
|
|
|
|
|
2020-06-01 14:57:07 +09:00
|
|
|
|
2022-05-01 17:40:13 +09:00
|
|
|
|
2008-02-28 09:40:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-28 17:19:35 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2013-04-04 17:37:38 +10:30
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-05-01 17:40:13 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-06-01 14:57:22 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2008-02-28 09:40:52 +01:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2020-06-01 14:57:08 +09:00
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:13 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-28 09:40:52 +01:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2013-09-23 15:23:54 +09:30
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2013-09-23 15:23:54 +09:30
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2013-04-04 17:37:38 +10:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2015-10-06 09:44:42 +10:30
|
|
|
|
2020-12-01 19:34:18 +09:00
|
|
|
|
2015-10-06 09:44:42 +10:30
|
|
|
|
2020-03-06 17:02:06 +01:00
|
|
|
|
2022-05-01 17:40:07 +09:00
|
|
|
|
2020-03-06 17:02:06 +01:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:13 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-28 09:40:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-11 19:17:15 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-04-04 17:37:38 +10:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-01 17:40:10 +09:00
|
|
|
|
2022-05-05 16:22:33 +09:00
|
|
|
|
2022-04-25 04:07:45 +09:00
|
|
|
|
|
|
|
|
|
kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.
Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.
It is time to get rid of this complexity.
Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.
Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.
Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.
No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.
Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-13 20:39:22 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-05 16:22:33 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2019-10-29 21:38:07 +09:00
|
|
|
|
|
|
|
|
|
2019-09-06 11:32:31 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:18 +09:00
|
|
|
|
|
|
|
|
|
2019-02-01 13:50:45 +09:00
|
|
|
|
2019-08-01 09:06:57 +03:00
|
|
|
|
kbuild: fix false-positive modpost warning when all symbols are trimmed
Nathan reports that the mips defconfig emits the following warning:
WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.
This false-positive happens when CONFIG_TRIM_UNUSED_KSYMS is enabled,
but no CONFIG option is set to 'm'.
Commit a0590473c5e6 ("nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default")
turned the last 'm' into 'y' for the mips defconfig, and uncovered
this issue.
In this case, the module feature itself is enabled, but we have no
module to build. As a result, CONFIG_TRIM_UNUSED_KSYMS drops all the
instances of EXPORT_SYMBOL. Then, modpost wrongly assumes vmlinux is
missing because vmlinux.symvers is empty. (As another false-positive
case, you can create a module that does not use any symbol of vmlinux).
The current behavior is to entirely suppress the unresolved symbol
warnings when vmlinux is missing just because there are too many.
I found the origin of this code in the historical git tree. [1]
If this is a matter of noisiness, I think modpost can display the
first 10 warnings, and the number of suppressed warnings at the end.
You will get a bit noisier logs when you run 'make modules' without
vmlinux, but such warnings are better to show because you never know
the resulting modules are actually loadable or not.
This commit changes the following:
- If any of input *.symver files is missing, pass -w option to let
the module build keep going with warnings instead of errors.
- If there are too many (10+) unresolved symbol warnings, show only
the first 10, and also the number of suppressed warnings.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=1cc0e0529569bf6a94f6d49770aa6d4b599d2c46
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2021-03-26 03:54:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-01 19:34:15 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|