Alexander Lobakin
b5beffa20d
modpost: fix removing numeric suffixes
...
With the `-z unique-symbol` linker flag or any similar mechanism,
it is possible to trigger the following:
ERROR: modpost: "param_set_uint.0" [vmlinux] is a static EXPORT_SYMBOL
The reason is that for now the condition from remove_dot():
if (m && (s[n + m] == '.' || s[n + m] == 0))
which was designed to test if it's a dot or a '\0' after the suffix
is never satisfied.
This is due to that `s[n + m]` always points to the last digit of a
numeric suffix, not on the symbol next to it (from a custom debug
print added to modpost):
param_set_uint.0, s[n + m] is '0', s[n + m + 1] is '\0'
So it's off-by-one and was like that since 2014.
Fix this for the sake of any potential upcoming features, but don't
bother stable-backporting, as it's well hidden -- apart from that
LD flag, it can be triggered only with GCC LTO which never landed
upstream.
Fixes: fcd38ed0ff26 ("scripts: modpost: fix compilation warning")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-05-27 16:05:01 +09:00
..
2022-05-18 00:08:27 +02:00
2022-05-08 01:33:07 -07:00
2021-09-19 10:13:03 +09:00
2022-01-15 12:15:35 +01:00
2022-05-20 22:40:56 +02:00
2022-05-08 03:16:59 +09:00
2022-05-24 08:25:16 -07:00
2021-12-16 15:52:38 +01:00
2022-05-24 16:33:20 +09:00
2022-04-05 17:03:31 +09:00
2022-05-27 16:05:01 +09:00
2022-04-22 12:32:03 +02:00
2022-05-03 15:53:49 -04:00
2021-08-04 17:49:26 -04:00
2022-01-08 18:28:21 +09:00
2022-05-08 03:16:59 +09:00
2021-09-03 08:17:20 +09:00
2019-05-24 17:27:11 +02:00
2018-07-18 01:18:05 +09:00
2021-01-22 06:34:44 +09:00
2019-06-05 17:37:11 +02:00
2022-05-23 14:30:17 -07:00
2018-06-28 13:36:39 +09:00
2021-04-25 05:14:26 +09:00
2021-09-08 11:50:28 -07:00
2022-05-23 18:47:49 +03:00
2020-02-25 03:35:16 -07:00
2021-08-10 09:13:25 +09:00
2021-09-19 10:13:03 +09:00
2022-04-26 01:30:33 -05:00
2020-05-26 00:03:16 +09:00
2022-05-08 03:16:59 +09:00
2021-08-05 20:55:39 +09:00
2021-05-18 11:09:59 +02:00
2021-01-04 10:38:11 +09:00
2022-01-20 08:52:54 +02:00
2021-07-08 11:48:22 -07:00
2021-11-06 13:30:32 -07:00
2021-01-01 12:26:39 -08:00
2020-09-04 18:19:37 +02:00
2021-01-22 06:34:44 +09:00
2021-10-26 09:42:29 -06:00
2020-03-17 08:59:03 +09:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:37:10 +02:00
2022-05-12 12:07:11 -07:00
2018-03-26 02:01:24 +09:00
2020-01-27 14:25:06 -07:00
2019-01-06 09:46:51 +09:00
2021-03-08 13:19:05 +01:00
2018-06-25 23:21:13 +09:00
2022-05-08 03:16:59 +09:00
2021-09-03 08:17:21 +09:00
2022-05-08 01:33:07 -07:00
2021-01-14 08:21:09 -08:00
2022-03-31 12:10:42 -07:00
2019-05-24 17:36:45 +02:00
2022-03-28 13:53:46 -06:00
2022-01-20 08:52:53 +02:00
2019-05-30 11:26:39 -07:00
2020-08-07 13:29:39 -07:00
2022-05-11 21:45:53 +09:00
2021-05-17 12:10:03 +09:00
2022-05-27 15:51:48 +09:00
2022-01-08 17:46:35 +09:00
2021-04-25 05:14:41 +09:00
2022-03-28 13:53:46 -06:00
2021-04-25 05:14:26 +09:00
2021-10-15 11:25:13 +02:00
2022-05-26 12:09:50 -07:00
2022-04-05 17:03:31 +09:00
2021-03-15 19:20:48 +09:00
2022-05-26 12:09:50 -07:00
2022-03-21 08:13:03 -07:00
2022-05-08 03:17:00 +09:00
2021-04-25 05:25:56 +09:00
2021-10-24 13:48:33 +09:00
2021-03-15 19:20:48 +09:00
2022-05-08 03:16:59 +09:00
2022-05-08 01:33:06 -07:00
2021-03-15 19:20:48 +09:00
2020-08-10 01:32:59 +09:00
2021-09-24 16:13:35 -07:00
2020-08-10 01:32:59 +09:00
2021-12-09 16:42:27 -08:00
2022-05-08 03:16:59 +09:00
2021-11-01 18:09:58 -07:00
2022-01-08 18:03:57 +09:00
2022-05-27 15:51:48 +09:00
2021-10-12 11:50:46 +09:00
2022-05-08 01:33:07 -07:00
2022-01-20 08:52:55 +02:00
2020-05-17 18:52:01 +09:00
2022-05-24 16:33:20 +09:00
2019-06-05 17:37:10 +02:00
2022-05-17 15:16:29 +02:00
2022-03-11 15:36:35 +01:00
2020-06-06 23:39:20 +09:00
2021-07-19 14:51:40 +02:00
2021-04-25 05:22:42 +09:00
2021-05-02 00:43:35 +09:00
2019-05-30 11:29:23 -07:00
2022-05-12 10:08:43 -07:00
2022-02-22 14:32:44 -08:00
2022-02-02 11:19:33 +01:00
2020-03-26 15:08:27 -07:00
2022-05-11 21:46:38 +09:00
2021-03-02 17:27:18 -05:00
2021-06-18 09:09:17 -04:00
2022-03-07 13:54:59 +01:00
2022-01-19 11:15:19 +02:00
2022-01-08 18:03:57 +09:00
2020-12-08 23:30:04 +09:00
2022-03-08 00:33:00 +01:00
2022-01-18 10:17:18 -05:00
2021-07-21 15:59:32 +02:00
2022-02-04 16:43:01 +01:00
2022-03-22 15:57:00 -07:00
2022-01-07 09:33:13 -07:00
2020-12-08 23:30:04 +09:00
2021-09-01 21:52:02 +02:00
2021-07-09 04:00:39 +09:00
2021-08-10 09:13:25 +09:00
2021-07-09 04:00:39 +09:00
2021-11-26 16:58:55 +01:00
2022-02-13 16:50:06 -08:00
2021-06-08 13:09:34 +01:00
2018-11-30 14:45:01 -08:00
2021-05-03 17:23:06 -06:00
2021-08-10 09:13:25 +09:00
2020-06-06 23:42:01 +09:00