Josh Poimboeuf
a63068e939
static_call: Allow module use without exposing static_call_key
...
[ Upstream commit 73f44fe19d359635a607e8e8daa0da4001c1cfc2 ]
When exporting static_call_key; with EXPORT_STATIC_CALL*(), the module
can use static_call_update() to change the function called. This is
not desirable in general.
Not exporting static_call_key however also disallows usage of
static_call(), since objtool needs the key to construct the
static_call_site.
Solve this by allowing objtool to create the static_call_site using
the trampoline address when it builds a module and cannot find the
static_call_key symbol. The module loader will then try and map the
trampole back to a key before it constructs the normal sites list.
Doing this requires a trampoline -> key associsation, so add another
magic section that keeps those.
Originally-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com >
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Signed-off-by: Ingo Molnar <mingo@kernel.org >
Link: https://lkml.kernel.org/r/20210127231837.ifddpn7rhwdaepiu@treble
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-03-30 14:31:53 +02:00
..
2021-01-27 11:55:00 +01:00
2020-02-17 20:12:17 +01:00
2015-06-23 13:35:49 +09:00
2017-11-02 11:10:55 +01:00
2019-06-03 12:32:56 +02:00
2020-08-24 15:09:59 -07:00
2020-01-07 07:47:23 -08:00
2020-07-29 16:14:18 +02:00
2017-11-02 11:10:55 +01:00
2018-01-30 19:07:54 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 13:28:48 -08:00
2020-11-14 11:26:03 -08:00
2020-03-06 11:06:19 +01:00
2017-11-02 11:10:55 +01:00
2020-10-25 14:51:49 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-06-26 00:27:37 -07:00
2020-08-20 15:45:14 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-09-17 13:00:46 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-06-05 17:37:16 +02:00
2019-09-17 14:30:30 -07:00
2018-12-13 21:06:18 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-10-25 14:51:49 -07:00
2019-05-24 17:27:11 +02:00
2019-12-16 10:35:33 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-14 15:05:45 -08:00
2019-06-24 09:16:47 +10:00
2019-06-19 17:09:55 +02:00
2020-03-27 23:58:55 -04:00
2019-08-03 07:02:01 -07:00
2020-02-10 12:58:36 +01:00
2017-11-02 11:10:55 +01:00
2020-06-20 22:14:53 +10:00
2020-06-03 15:13:47 -07:00
2017-11-02 11:10:55 +01:00
2018-06-07 17:34:38 -07:00
2020-10-05 09:44:16 +01:00
2017-11-02 11:10:55 +01:00
2020-08-14 19:56:57 -07:00
2019-05-30 11:26:32 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-01-12 20:18:16 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-10-25 14:51:49 -07:00
2018-03-06 18:40:44 +01:00
2020-07-09 13:29:42 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2014-02-09 21:18:52 +01:00
2017-11-02 11:10:55 +01:00
2020-01-23 10:41:16 -08:00
2015-07-17 16:39:53 -07:00
2019-04-08 11:59:39 +01:00
2020-07-17 10:02:03 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-09-25 00:36:41 +09:00
2020-10-14 19:14:51 +00:00
2017-11-02 11:10:55 +01:00
2019-02-22 21:53:25 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-09 23:19:56 +01:00
2018-05-07 07:15:41 +02:00
2020-10-26 23:54:48 +00:00
2020-08-14 19:56:55 -07:00
2020-04-07 10:43:39 -07:00
2019-12-01 06:29:19 -08:00
2020-06-09 09:39:14 -07:00
2020-06-09 09:39:14 -07:00
2019-07-31 19:03:34 +02:00
2018-02-06 10:28:58 +01:00
2019-05-30 11:26:37 -07:00
2020-07-29 16:14:19 +02:00
2020-08-07 10:33:50 -07:00
2017-11-02 11:10:55 +01:00
2020-07-21 10:50:36 +01:00
2020-07-10 16:01:52 -07:00
2020-08-11 12:06:15 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-05-14 19:52:48 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-05-24 17:27:11 +02:00
2019-05-30 11:29:21 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-08-07 11:33:26 -07:00
2017-11-02 11:10:55 +01:00
2020-05-28 11:35:41 -07:00
2017-11-02 11:10:55 +01:00
2020-10-27 16:13:09 +01:00
2017-11-02 11:10:55 +01:00
2011-03-01 15:49:39 +01:00
2020-04-23 10:50:26 +09:00
2017-11-02 11:10:55 +01:00
2021-03-30 14:31:53 +02:00
2013-09-30 14:31:02 -07:00
2017-11-02 11:10:55 +01:00
2019-05-24 17:27:13 +02:00