Dmitry Safonov
a846446b19
x86/compat: Adjust in_compat_syscall() to generic code under !COMPAT
...
The result of in_compat_syscall() can be pictured as:
x86 platform:
---------------------------------------------------
| Arch\syscall | 64-bit | ia32 | x32 |
|-------------------------------------------------|
| x86_64 | false | true | true |
|-------------------------------------------------|
| i686 | | <true> | |
---------------------------------------------------
Other platforms:
-------------------------------------------
| Arch\syscall | 64-bit | compat |
|-----------------------------------------|
| 64-bit | false | true |
|-----------------------------------------|
| 32-bit(?) | | <false> |
-------------------------------------------
As seen, the result of in_compat_syscall() on generic 32-bit platform
differs from i686.
There is no reason for in_compat_syscall() == true on native i686. It also
easy to misread code if the result on native 32-bit platform differs
between arches.
Because of that non arch-specific code has many places with:
if (IS_ENABLED(CONFIG_COMPAT) && in_compat_syscall())
in different variations.
It looks-like the only non-x86 code which uses in_compat_syscall() not
under CONFIG_COMPAT guard is in amd/amdkfd. But according to the commit
a18069c132cb ("amdkfd: Disable support for 32-bit user processes"), it
actually should be disabled on native i686.
Rename in_compat_syscall() to in_32bit_syscall() for x86-specific code
and make in_compat_syscall() false under !CONFIG_COMPAT.
A follow on patch will clean up generic users which were forced to check
IS_ENABLED(CONFIG_COMPAT) with in_compat_syscall().
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-efi@vger.kernel.org
Cc: netdev@vger.kernel.org
Link: https://lkml.kernel.org/r/20181012134253.23266-2-dima@arista.com
2018-11-01 12:59:25 +01:00
..
2018-03-03 00:03:35 +08:00
2017-11-02 11:10:55 +01:00
2018-10-23 13:08:53 +01:00
2018-09-19 15:52:21 +02:00
2018-10-02 21:29:16 +02:00
2018-09-26 08:45:18 -06:00
2017-03-02 08:42:37 +01:00
2018-10-10 10:44:22 +02:00
2017-11-02 11:10:55 +01:00
2018-10-04 11:24:59 +02:00
2018-10-04 11:24:59 +02:00
2018-09-27 18:28:58 +02:00
2017-11-02 11:10:55 +01:00
2018-08-05 09:53:13 +02:00
2017-11-02 11:10:55 +01:00
2018-07-16 17:59:57 +02:00
2017-11-02 11:10:55 +01:00
2017-09-24 11:19:01 +02:00
2018-02-20 09:38:26 +01:00
2018-10-06 15:52:15 +02:00
2018-09-03 12:41:41 +02:00
2018-10-16 17:33:54 +02:00
2018-10-16 17:33:54 +02:00
2018-06-21 16:00:21 +02:00
2017-11-02 11:10:55 +01:00
2018-10-16 17:33:54 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-04 11:25:00 +02: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
2018-09-27 18:28:57 +02: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
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-12 12:15:35 +01:00
2018-07-25 11:53:58 +02:00
2018-10-01 13:46:32 +02:00
2018-11-01 12:59:25 +01:00
2017-11-02 11:10:55 +01:00
2018-09-12 21:33:53 +02:00
2017-11-02 11:10:55 +01:00
2018-10-06 15:52:16 +02:00
2018-10-25 07:42:48 +02: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
2018-09-03 16:50:36 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-03 16:50:36 +02:00
2018-03-20 10:01:57 +01:00
2018-01-30 15:08:27 +01:00
2017-11-02 11:10:55 +01:00
2018-03-20 10:01:59 +01:00
2018-05-28 12:48:25 +02:00
2017-11-02 11:10:55 +01:00
2018-08-05 09:53:13 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-26 12:14:55 +02:00
2018-10-23 15:24:22 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-12 17:33:38 -08:00
2017-12-22 20:13:05 +01:00
2018-09-03 15:12:09 +02:00
2017-11-02 11:10:55 +01:00
2018-10-23 17:54:58 +01:00
2016-12-18 09:25:38 +01:00
2017-11-02 11:10:55 +01:00
2018-10-08 10:45:04 +02:00
2018-11-01 12:59:25 +01:00
2018-09-03 15:12:09 +02:00
2017-11-02 11:10:55 +01:00
2018-08-05 09:53:13 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-26 16:26:34 -07:00
2018-06-26 09:07:58 +02:00
2018-03-28 10:40:55 +02:00
2018-10-23 17:54:58 +01:00
2018-01-14 21:11:54 +01:00
2018-08-15 13:44:10 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-02-23 07:37:23 +01:00
2017-11-01 21:50:11 +01:00
2017-11-02 11:10:55 +01:00
2017-11-23 20:17:59 +01:00
2018-05-13 19:52:55 +02:00
2017-11-02 11:10:55 +01:00
2018-07-25 11:50:50 +02:00
2018-05-19 14:03:14 +02:00
2018-03-12 12:10:54 +01:00
2017-11-27 13:39:11 +02: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
2016-05-05 13:58:55 -07:00
2018-10-02 10:14:32 +02:00
2018-07-03 13:08:21 +02:00
2017-12-22 20:13:04 +01:00
2018-02-17 11:47:45 +01:00
2018-10-23 17:05:28 +01:00
2017-11-02 11:10:55 +01:00
2018-03-20 10:01:56 +01:00
2017-12-04 10:56:53 +10:00
2016-03-08 12:26:41 +01:00
2017-11-02 11:10:55 +01:00
2018-09-25 14:33:43 +02:00
2018-04-26 11:57:57 +02:00
2017-11-02 11:10:55 +01:00
2017-11-07 10:51:10 +01:00
2017-12-29 21:13:04 +01:00
2018-09-03 16:50:36 +02:00
2018-04-23 10:17:28 +02:00
2018-10-06 15:52:17 +02:00
2018-02-06 18:32:43 -08:00
2018-02-14 13:11:13 +01:00
2017-11-02 11:10:55 +01:00
2018-08-22 10:52:47 -07:00
2018-09-06 14:33:12 +02:00
2018-04-13 17:10:27 -07:00
2018-10-09 17:18:31 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-06-21 12:33:13 +02:00
2018-09-27 18:28:59 +02:00
2018-10-17 19:07:38 +02:00
2017-11-02 11:10:55 +01:00
2018-07-20 00:02:36 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-07-14 15:07:00 +02:00
2018-10-16 17:33:54 +02: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
2018-05-19 14:03:14 +02:00
2018-10-23 16:16:40 +01:00
2018-05-22 23:18:31 -07:00
2018-09-15 20:48:45 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-02 15:16:43 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-03 16:50:37 +02:00
2017-12-22 20:13:01 +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
2017-11-02 11:10:55 +01:00
2017-12-17 12:58:53 +01:00
2018-01-14 21:11:54 +01:00
2017-11-02 11:10:55 +01:00
2018-09-19 15:53:11 +02:00
2018-10-09 14:21:39 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-02 10:14:31 +02:00
2017-11-02 11:10:55 +01:00
2018-09-03 16:50:36 +02:00
2016-03-29 12:23:26 +02: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
2018-09-23 15:25:28 +02: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
2017-07-26 13:18:20 +02:00
2018-06-21 16:34:56 +02:00
2018-06-20 19:09:59 +02:00
2017-11-02 11:10:55 +01:00
2018-10-06 14:46:46 +02:00
2018-04-02 15:45:30 -07:00
2018-06-06 13:38:01 +02:00
2017-11-02 11:10:55 +01:00
2018-10-30 09:55:31 +01:00
2018-09-06 14:37:37 +02:00
2017-11-02 11:10:55 +01:00
2018-01-16 16:40:09 +01:00
2017-11-02 11:10:55 +01:00
2018-03-08 12:30:38 +01:00
2018-06-29 20:06:07 -05:00
2017-11-02 11:10:55 +01:00
2018-05-07 07:15:41 +02:00
2018-10-14 11:11:22 +02:00
2017-11-02 11:10:55 +01:00
2018-10-09 08:50:10 +02:00
2018-09-03 16:50:37 +02:00
2018-07-20 01:11:47 +02:00
2018-07-20 01:11:42 +02:00
2018-07-20 01:11:47 +02:00
2018-09-20 23:17:22 +02:00
2018-10-09 11:44:58 -07:00
2018-07-20 01:11:42 +02:00
2018-09-14 17:08:45 +02:00
2018-09-03 16:50:36 +02:00
2018-08-27 14:20:49 -04:00
2018-08-17 10:27:36 -07:00
2018-10-23 17:54:58 +01:00
2018-06-07 10:23:33 -07:00
2018-03-01 16:22:48 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-16 17:33:54 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-07-20 01:11:44 +02:00
2018-10-23 18:43:04 +01:00
2017-11-02 11:10:55 +01:00
2018-07-20 01:11:45 +02:00
2018-10-24 11:22:39 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-19 14:03:14 +02:00
2017-11-02 11:10:55 +01:00
2018-07-25 11:22:20 +02:00
2018-10-16 17:33:54 +02: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
2018-10-16 17:33:54 +02:00
2018-02-16 10:48:49 +01:00
2017-11-02 11:10:55 +01:00
2018-10-16 17:33:54 +02:00
2017-11-07 10:32:44 +01:00
2017-11-02 11:10:55 +01:00
2018-09-12 21:33:53 +02:00
2018-10-23 17:54:58 +01:00
2017-11-02 11:10:55 +01:00
2018-08-25 18:43:59 -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
2017-11-02 11:10:55 +01:00
2018-08-30 13:02:31 +02:00
2017-11-02 11:10:55 +01:00
2018-05-06 12:49:14 +02:00
2018-05-19 11:56:57 +02:00
2018-05-17 17:09:21 +02:00
2018-09-03 16:50:37 +02:00
2017-11-02 11:10:55 +01:00
2017-11-07 10:32:44 +01:00
2017-11-02 11:10:55 +01:00
2018-06-14 12:21:18 +09:00
2018-08-31 17:08:22 +02:00
2017-11-15 18:21:05 -08:00
2018-09-10 15:17:12 +02:00
2017-11-02 11:10:55 +01:00
2018-10-03 11:56:33 +02:00
2017-12-15 12:21:38 +01:00
2018-10-03 11:56:34 +02:00
2018-03-28 22:47:06 +02:00
2018-03-20 10:01:57 +01:00
2018-07-20 01:11:40 +02:00
2017-11-02 11:10:55 +01:00
2018-02-05 21:34:57 +01:00
2018-04-09 16:47:28 +02:00
2018-04-05 16:59:38 +02:00
2018-04-09 16:47:28 +02:00
2018-07-20 00:02:38 +02:00
2018-05-09 21:41:38 +02:00
2017-11-02 11:10:55 +01:00
2017-11-13 19:07:38 -08:00
2017-11-02 11:10:55 +01:00
2018-10-09 16:51:12 +02:00
2017-11-02 11:10:55 +01:00
2018-10-29 19:04:31 +01:00
2018-06-21 14:20:57 +02:00
2017-11-02 11:10:55 +01:00
2018-01-19 16:31:28 +01:00
2018-07-20 00:02:44 +02:00
2018-01-30 21:54:31 +01:00
2018-07-16 00:05:05 +02:00
2018-09-03 15:12:09 +02:00
2017-11-08 11:16:22 +01:00
2017-11-02 11:10:55 +01:00
2018-08-29 15:42:23 +02:00
2018-06-21 16:34:56 +02:00
2018-01-03 16:14:46 +01:00
2017-12-11 18:42:11 +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
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-23 19:07:25 +01:00
2018-10-25 17:57:35 -07:00
2017-11-02 11:10:55 +01:00
2018-10-17 00:30:08 +02:00
2017-12-23 21:13:00 +01:00
2017-11-02 11:10:55 +01:00
2018-10-10 10:44:22 +02:00
2016-04-13 11:37:40 +02:00
2017-11-02 11:10:55 +01:00
2016-04-13 11:37:40 +02:00
2017-11-15 18:21:04 -08:00