Mike Rapoport
6d47c23b16
set_memory: allow querying whether set_direct_map_*() is actually enabled
...
On arm64, set_direct_map_*() functions may return 0 without actually
changing the linear map. This behaviour can be controlled using kernel
parameters, so we need a way to determine at runtime whether calls to
set_direct_map_invalid_noflush() and set_direct_map_default_noflush() have
any effect.
Extend set_memory API with can_set_direct_map() function that allows
checking if calling set_direct_map_*() will actually change the page
table, replace several occurrences of open coded checks in arm64 with the
new function and provide a generic stub for architectures that always
modify page tables upon calls to set_direct_map APIs.
[arnd@arndb.de: arm64: kfence: fix header inclusion ]
Link: https://lkml.kernel.org/r/20210518072034.31572-4-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christopher Lameter <cl@linux.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Cc: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Palmer Dabbelt <palmerdabbelt@google.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tycho Andersen <tycho@tycho.ws>
Cc: Will Deacon <will@kernel.org>
Cc: kernel test robot <lkp@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-07-08 11:48:20 -07:00
..
2021-04-26 16:32:11 -07:00
2021-06-07 13:24:50 -07:00
2021-06-24 21:03:17 +02:00
2021-06-29 13:33:10 -07:00
2021-06-11 12:45:38 -07:00
2021-04-30 13:04:30 -07:00
2021-06-15 09:27:35 +02:00
2021-07-05 11:48:14 -07:00
2021-06-13 17:00:17 +01:00
2021-06-05 20:34:06 -07:00
2021-06-01 10:45:59 +01:00
2021-06-26 11:40:20 -05:00
2021-07-05 12:10:34 -07:00
2021-06-03 14:19:53 -03:00
2021-07-01 14:54:03 -07:00
2021-06-14 13:57:44 +02:00
2021-07-05 11:21:51 -07:00
2021-06-02 20:06:36 -03:00
2021-06-07 12:23:36 +02:00
2021-05-03 23:04:01 +02:00
2021-04-26 03:20:07 +02:00
2021-04-26 18:16:56 +02:00
2021-04-26 18:16:56 +02:00
2021-06-11 13:43:56 -07:00
2021-07-05 14:16:22 -07:00
2021-07-01 16:57:14 -07:00
2021-07-05 14:01:53 -07:00
2021-06-03 14:04:18 -07:00
2021-06-21 19:28:42 +01:00
2021-07-07 11:12:01 -07:00
2021-06-23 13:35:12 -05:00
2021-07-05 13:42:16 -07:00
2021-06-25 12:26:49 +01:00
2021-07-01 11:06:05 -07:00
2021-06-16 17:47:53 +02:00
2021-05-17 13:30:29 +02:00
2021-07-05 14:16:22 -07:00
2021-06-25 15:02:43 +02:00
2021-06-11 13:08:53 -07:00
2021-06-25 15:02:43 +02:00
2021-07-02 13:22:47 -07:00
2021-06-23 07:33:55 -07:00
2021-05-06 19:24:11 -07:00
2021-06-14 15:55:02 +02:00
2021-06-08 14:00:12 +01:00
2021-07-01 11:06:04 -07:00
2021-05-07 00:26:33 -07:00
2021-05-17 09:10:20 -06:00
2021-05-26 13:20:52 +02:00
2021-06-29 10:53:48 -07:00
2021-06-30 12:21:16 -07:00
2021-05-07 00:34:51 -07:00
2021-05-06 19:24:12 -07:00
2021-05-22 15:09:07 -10:00
2021-06-30 18:19:39 -07:00
2021-06-10 10:01:32 -04:00
2021-06-18 08:53:35 -06:00
2021-06-30 18:19:39 -07:00
2021-07-08 11:48:20 -07:00
2021-06-30 20:47:25 -07:00
2021-05-24 21:13:05 -07:00
2021-05-19 00:33:39 +02:00
2021-05-19 00:33:40 +02:00
2021-06-15 18:01:06 +02:00
2021-05-19 00:33:39 +02:00
2021-05-19 00:33:40 +02:00
2021-05-05 11:27:24 -07:00
2021-06-08 14:59:02 -04:00
2021-07-02 15:14:36 -07:00
2021-06-08 17:00:09 +02:00
2021-06-22 16:53:17 +02:00
2021-05-05 11:27:24 -07:00
2021-05-05 11:27:24 -07:00
2021-07-01 11:06:06 -07:00
2021-06-30 14:33:25 -07:00
2021-07-02 12:08:10 -07:00
2021-07-01 11:06:06 -07:00
2021-07-01 11:06:06 -07:00
2021-04-25 05:26:10 +09:00
2021-06-30 14:33:25 -07:00
2021-05-07 00:26:34 -07:00
2021-05-13 11:00:18 -07:00
2021-05-22 15:09:07 -10:00
2021-05-05 22:54:12 +02:00
2021-06-29 10:53:54 -07:00
2021-07-08 11:48:20 -07:00
2021-05-06 19:24:12 -07:00
2021-06-28 20:39:26 -07:00
2021-06-24 14:51:35 +08:00
2021-06-22 13:56:43 +02:00
2021-05-21 20:59:55 +02:00
2021-07-08 11:48:20 -07:00
2021-05-12 11:43:25 +02:00
2021-06-21 11:22:05 +02:00
2021-06-04 12:07:37 -04:00
2021-07-05 14:16:22 -07:00
2021-06-17 13:21:06 +02:00
2021-06-15 15:42:03 -04:00
2021-06-25 15:02:43 +02:00
2021-06-06 11:19:51 +02:00
2021-05-31 09:50:38 +05:30
2021-05-13 20:50:23 +02:00
2021-05-14 13:45:24 +02:00
2021-06-24 18:43:55 -06:00
2021-04-25 05:25:42 +09:00
2021-06-17 14:11:43 +02:00
2021-05-31 10:14:49 +02:00
2021-06-22 10:40:54 -07:00
2021-06-02 18:56:13 -04:00
2021-05-21 13:15:39 +02:00
2021-05-25 12:21:14 +02:00
2021-06-01 17:38:40 +02:00
2021-05-28 17:44:36 +02:00
2021-06-24 19:41:15 +02:00
2021-05-13 16:14:45 +02:00
2021-07-05 13:42:16 -07:00
2021-04-23 10:14:32 +01:00
2021-04-23 10:14:32 +01:00
2021-06-25 19:57:01 -04:00
2021-06-25 11:46:29 -07:00
2021-05-10 16:22:27 +02:00
2021-06-24 12:01:06 -06:00
2021-05-07 00:26:34 -07:00
2021-05-07 00:26:34 -07:00
2021-06-29 17:29:11 -07:00
2021-06-30 09:15:15 +02:00
2021-06-04 19:32:21 +01:00
2021-05-17 12:31:05 +02:00
2021-06-30 20:47:30 -07:00
2021-06-30 20:47:25 -07:00
2021-07-02 12:08:10 -07:00
2021-05-14 17:39:32 +00:00
2021-07-05 14:01:53 -07:00
2021-06-23 11:29:14 +02:00
2021-06-21 14:51:24 -07:00
2021-06-28 14:09:03 -07:00
2021-06-12 13:18:49 -07:00
2021-05-06 19:24:11 -07:00
2021-05-24 15:24:33 -07:00
2021-05-07 00:26:33 -07:00
2021-05-19 15:30:59 -05:00
2021-05-21 12:48:39 -04:00
2021-06-10 09:06:14 +02:00
2021-05-19 11:04:47 +02:00
2021-04-30 11:20:39 -07:00
2021-04-30 11:20:40 -07:00
2021-06-29 10:53:48 -07:00
2021-04-26 15:03:23 -07:00
2021-05-17 20:01:35 +02:00
2021-06-10 13:09:19 +01:00
2021-06-10 13:09:18 +01:00
2021-06-24 10:54:49 -04:00
2021-05-12 14:54:55 +02:00
2021-06-29 17:29:11 -07:00
2021-05-09 00:29:45 +09:00
2021-06-30 20:47:28 -07:00
2021-07-02 12:08:10 -07:00
2021-06-01 10:29:21 +01:00
2021-07-02 12:54:34 -07:00
2021-07-01 11:06:05 -07:00
2021-06-29 17:29:11 -07:00
2021-06-24 18:00:29 -04:00
2021-06-24 11:47:57 -04:00
2021-06-16 06:50:25 -06:00
2021-06-15 16:47:22 -07:00
2021-06-11 04:35:40 +09:00
2021-05-12 20:11:17 +02:00
2021-04-28 12:37:53 -07:00
2021-07-08 11:48:20 -07:00
2021-05-14 16:38:19 -04:00
2021-05-10 21:38:31 -04:00
2021-05-01 18:50:44 -07:00
2021-04-20 16:27:54 -07:00
2021-06-17 13:09:27 -04:00
2021-06-15 17:46:57 +02:00
2021-06-21 15:29:25 -06:00
2021-04-27 14:13:24 -07:00
2021-06-30 20:47:29 -07:00
2021-07-01 17:17:24 -07:00
2021-06-30 20:47:25 -07:00
2021-05-05 11:27:26 -07:00
2021-06-30 20:47:29 -07:00
2021-07-01 11:06:02 -07:00
2021-06-14 12:54:43 -07:00
2021-06-30 20:47:30 -07:00
2021-05-22 15:09:07 -10:00
2021-07-02 12:08:10 -07:00
2021-07-02 12:08:10 -07:00
2021-06-29 10:53:50 -07:00
2021-06-29 10:53:53 -07:00
2021-07-01 11:06:03 -07:00
2021-07-01 11:06:03 -07:00
2021-06-18 13:13:40 -07:00
2021-07-01 11:06:05 -07:00
2021-04-20 14:11:22 +01:00
2021-06-17 11:32:50 -07:00
2021-06-29 15:45:27 -07:00
2021-06-07 12:23:38 +02:00
2021-04-23 10:14:32 +01:00
2021-04-19 15:41:28 -07:00
2021-05-07 11:23:41 -07:00
2021-07-08 11:48:20 -07:00
2021-06-17 15:51:21 +02:00
2021-07-05 13:42:16 -07:00
2021-06-02 20:59:29 -05:00
2021-06-08 14:15:46 +02:00
2021-05-18 13:47:36 -07:00
2021-06-18 08:38:47 +02:00
2021-06-21 13:56:46 -06:00
2021-06-21 13:56:46 -06:00
2021-06-20 21:28:17 -05:00
2021-06-28 15:54:57 -07:00
2021-06-29 10:53:53 -07:00
2021-06-29 10:53:53 -07:00
2021-06-29 10:53:47 -07:00
2021-04-30 11:20:42 -07:00
2021-07-02 12:08:10 -07:00
2021-06-29 10:53:53 -07:00
2021-06-29 10:53:48 -07:00
2021-04-30 11:20:41 -07:00
2021-07-01 11:06:04 -07:00
2021-07-01 11:06:04 -07:00
2021-06-28 11:22:40 -07:00
2021-07-03 11:49:33 -07:00
2021-07-08 11:48:20 -07:00
2021-06-11 11:18:40 +01:00
2021-07-01 11:06:03 -07:00
2021-06-12 13:08:57 -07:00
2021-06-11 13:08:53 -07:00
2021-06-23 19:15:16 +02:00
2021-05-27 15:51:33 +02:00
2021-05-20 13:44:13 -06:00
2021-06-11 18:39:24 +02:00
2021-05-31 14:17:13 +02:00
2021-05-10 19:14:01 +02:00
2021-06-17 04:21:46 -07:00
2021-06-07 14:11:47 -07:00
2021-04-28 15:43:58 -07:00
2021-05-27 15:38:17 +02:00
2021-06-30 15:51:09 -07:00
2021-06-10 15:06:54 +02:00
2021-05-06 19:24:11 -07:00
2021-05-06 19:24:11 -07:00
2021-06-07 14:43:41 +02:00
2021-04-21 12:20:04 -04:00
2021-06-16 21:09:31 -07:00
2021-06-18 19:47:02 -07:00
2021-05-18 14:05:35 +01:00
2021-05-11 09:56:11 +02:00
2021-06-24 19:41:14 +02:00
2021-05-10 16:22:53 -07:00
2021-05-10 16:22:53 -07:00
2021-06-21 13:08:36 +01:00
2021-06-07 16:20:04 +01:00
2021-05-27 22:07:43 -05:00
2021-05-05 13:24:11 -07:00
2021-07-01 11:06:03 -07:00
2021-06-09 19:10:22 +02:00
2021-07-08 11:48:20 -07:00
2021-05-12 19:54:49 +02:00
2021-06-28 12:22:06 -07:00
2021-06-22 11:28:51 -07:00
2021-05-10 21:38:31 -04:00
2021-07-01 11:06:05 -07:00
2021-06-08 20:04:10 +02:00
2021-05-20 16:59:14 +02:00
2021-05-20 16:59:14 +02:00
2021-07-08 11:48:20 -07:00
2021-07-02 12:08:10 -07:00
2021-05-05 11:27:23 -07:00
2021-04-30 14:14:02 -05:00
2021-07-01 11:06:06 -07:00
2021-06-07 14:11:47 -07:00
2021-06-29 15:45:27 -07:00
2021-06-29 10:53:49 -07:00
2021-05-09 13:07:03 -07:00
2021-06-12 13:13:08 -07:00
2021-05-10 16:03:35 -07:00
2021-05-10 16:03:35 -07:00
2021-04-19 16:03:15 +02:00
2021-04-28 12:37:53 -07:00
2021-06-24 15:49:32 +02:00
2021-06-29 11:34:48 -07:00
2021-07-01 11:06:05 -07:00
2021-07-01 11:06:05 -07:00
2021-07-01 11:06:03 -07:00
2021-07-01 11:06:03 -07:00
2021-06-07 12:11:24 +02:00
2021-05-21 22:13:13 +02:00
2021-04-22 13:14:09 +02:00
2021-07-01 11:06:04 -07:00
2021-06-28 12:22:06 -07:00
2021-04-16 21:03:50 +02:00
2021-05-10 16:02:44 -07:00
2021-06-28 14:12:26 -04:00
2021-06-29 11:51:25 -04:00
2021-05-13 18:29:11 +02:00
2021-06-25 09:58:51 +02:00
2021-05-13 16:57:17 +02:00
2021-06-15 14:03:26 +02:00
2021-06-10 11:45:14 -04:00
2021-05-27 09:36:31 +02:00
2021-06-28 20:39:26 -07:00
2021-06-30 20:47:27 -07:00
2021-05-03 04:55:53 -04:00
2021-05-04 04:19:59 -04:00
2021-06-11 13:32:47 -07:00
2021-05-05 11:27:25 -07:00
2021-06-30 20:47:26 -07:00
2021-06-29 10:53:54 -07:00
2021-05-03 04:55:53 -04:00
2021-06-09 14:44:31 +02:00
2021-05-05 22:54:11 +02:00
2021-06-08 15:12:57 -06:00
2021-06-30 12:12:56 -07:00
2021-06-22 10:01:17 -07:00