Linus Torvalds
594cc251fd
make 'user_access_begin()' do 'access_ok()'
...
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being implied by other operations or
similar. Which makes it very hard to verify that the access has
actually been range-checked.
If you use the unsafe direct user accesses, hardware features (either
SMAP - Supervisor Mode Access Protection - on x86, or PAN - Privileged
Access Never - on ARM) do force you to use user_access_begin(). But
nothing really forces the range check.
By putting the range check into user_access_begin(), we actually force
people to do the right thing (tm), and the range check vill be visible
near the actual accesses. We have way too long a history of people
trying to avoid them.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2019-01-04 12:56:09 -08:00
..
2019-01-03 18:57:57 -08:00
2018-11-24 22:12:54 +01:00
2018-11-02 09:57:27 +00:00
2019-01-03 18:57:57 -08:00
2018-12-25 11:48:26 -08:00
2018-11-01 15:24:22 +01:00
2018-11-19 11:07:52 +10:00
2018-12-25 11:48:26 -08:00
2018-11-22 12:54:38 +10:00
2019-01-03 18:57:57 -08:00
2018-12-14 15:46:15 +09:00
2018-11-01 15:23:58 +01:00
2018-08-27 10:00:03 -04:00
2018-11-05 14:21:21 -05:00
2018-10-04 10:32:14 +10:00
2018-07-03 15:00:42 +02:00
2019-01-04 12:56:09 -08:00
2018-11-05 14:56:04 +01:00
2018-12-03 11:08:22 +08:00
2018-12-25 11:48:26 -08:00
2018-11-05 14:21:21 -05:00
2019-01-03 18:57:57 -08:00
2018-11-24 22:12:54 +01:00
2018-12-25 11:48:26 -08:00
2018-12-03 14:46:30 +02:00
2018-12-03 17:04:48 +01:00
2018-11-28 09:31:07 -08:00
2019-01-03 18:57:57 -08:00
2018-12-28 12:11:50 -08:00
2018-12-25 11:48:26 -08:00
2018-12-25 11:48:26 -08:00
2018-07-04 14:27:01 +02:00
2018-12-05 17:56:16 -05:00
2018-12-11 15:19:42 +01:00
2018-11-24 22:12:54 +01:00
2018-11-13 12:07:18 +01:00
2018-10-25 17:00:28 +02:00
2018-12-04 08:46:28 +01:00
2018-12-06 18:58:32 +01:00
2018-11-01 15:25:41 +01:00
2018-12-04 15:57:42 +01:00
2018-12-07 17:53:44 -05:00
2018-11-24 22:12:54 +01:00
2018-10-23 15:59:01 +02:00
2018-12-07 11:23:05 +10:00
2018-12-05 11:01:11 +01:00
2018-11-05 15:31:51 +00:00
2018-11-29 16:12:50 +01:00
2018-12-04 11:47:27 +01:00
2019-01-01 15:55:29 -08:00
2018-12-18 12:16:13 -05:00
2018-10-05 18:04:10 +02:00
2018-12-07 11:23:05 +10:00
2018-11-30 16:37:52 +01:00
2018-12-06 13:43:56 +10:00
2018-12-05 10:00:35 +01:00
2018-11-26 16:14:27 -05:00
2018-09-11 11:21:30 +01:00
2018-09-13 11:28:12 +02:00
2018-10-17 09:17:33 +02:00
2018-11-20 14:56:18 +01:00
2018-11-29 10:48:31 -05:00
2018-12-06 13:29:09 +10:00
2018-09-14 17:29:47 +01:00
2018-10-05 18:04:10 +02:00
2018-09-10 07:10:36 +02:00
2018-12-07 11:23:05 +10:00
2018-12-11 15:20:13 +01:00
2018-08-22 09:50:16 -07:00
2018-11-22 09:52:27 +01:00
2018-10-11 10:52:35 +02:00
2018-11-27 15:30:34 -08:00
2018-11-28 16:22:17 -05:00
2018-11-29 10:28:49 +10:00
2018-11-27 18:35:17 -08:00
2018-06-28 13:29:07 +10:00
2018-11-02 10:58:20 -07:00
2018-09-14 17:29:47 +01:00
2018-11-19 10:40:33 +10:00
2018-12-25 11:48:26 -08:00
2019-01-03 18:57:57 -08:00
2018-11-20 16:20:13 +02:00
2018-11-02 09:58:10 +00:00
2018-11-20 14:57:25 +01:00
2018-11-02 09:55:27 +00:00
2018-11-20 14:56:18 +01:00
2018-12-25 11:48:26 -08:00
2018-12-20 08:13:29 +01:00
2018-09-14 17:29:47 +01:00
2018-12-25 11:48:26 -08:00
2018-09-14 17:29:47 +01:00
2018-10-16 14:39:25 +02:00
2018-07-25 07:51:05 -04:00
2018-12-06 13:43:56 +10:00
2018-11-01 18:54:05 +01:00
2018-10-01 10:16:39 +02:00
2018-10-05 18:06:49 +02:00
2018-11-29 10:48:31 -05:00
2018-07-13 18:40:28 +02:00
2018-11-15 10:55:30 +01:00
2018-10-04 11:03:34 +10:00
2018-10-23 15:59:01 +02:00
2018-10-05 22:45:19 +02:00
2018-11-29 10:48:31 -05:00
2018-11-22 15:44:05 +01:00
2018-07-30 08:49:41 -04:00
2018-07-13 18:40:27 +02:00
2018-09-14 17:29:47 +01:00
2018-09-14 17:29:47 +01:00
2018-10-30 13:01:50 -07:00
2018-12-05 11:01:11 +01:00
2018-11-30 10:57:18 +01:00
2018-09-14 17:29:47 +01:00
2018-09-04 19:00:32 +01:00
2018-07-16 16:35:27 +01:00
2018-10-03 21:08:21 +02:00
2018-12-06 13:43:56 +10:00