Linus Torvalds
6b3a707736
Merge branch 'page-refs' (page ref overflow)
...
Merge page ref overflow branch.
Jann Horn reported that he can overflow the page ref count with
sufficient memory (and a filesystem that is intentionally extremely
slow).
Admittedly it's not exactly easy. To have more than four billion
references to a page requires a minimum of 32GB of kernel memory just
for the pointers to the pages, much less any metadata to keep track of
those pointers. Jann needed a total of 140GB of memory and a specially
crafted filesystem that leaves all reads pending (in order to not ever
free the page references and just keep adding more).
Still, we have a fairly straightforward way to limit the two obvious
user-controllable sources of page references: direct-IO like page
references gotten through get_user_pages(), and the splice pipe page
duplication. So let's just do that.
* branch page-refs:
fs: prevent page refcount overflow in pipe_buf_get
mm: prevent get_user_pages() from overflowing page refcount
mm: add 'try_get_page()' helper function
mm: make page ref count overflow check tighter and more explicit
2019-04-14 15:09:40 -07:00
..
2019-02-26 11:23:49 +00:00
2018-11-14 10:56:33 -08:00
2018-03-31 01:33:09 +08:00
2019-03-20 16:27:40 +01:00
2019-01-07 17:57:13 +05:30
2018-01-04 13:35:07 -05:00
2018-03-21 13:58:08 +09:00
2019-02-15 17:17:57 +01:00
2018-10-16 11:13:50 +02:00
2019-03-06 09:41:12 -08:00
2019-02-02 09:28:51 +00:00
2019-02-06 22:17:42 -08:00
2019-03-21 12:30:54 +01:00
2018-08-09 16:11:21 -04:00
2019-03-06 20:34:20 -06:00
2019-03-08 10:02:58 -08:00
2019-03-29 12:24:41 -07:00
2019-02-28 09:16:12 +01:00
2019-02-25 09:28:54 +01:00
2019-03-01 14:28:43 +01:00
2018-11-21 13:16:33 +00:00
2019-02-07 11:11:05 +05:30
2019-01-28 14:39:52 +01:00
2019-04-13 14:33:56 -07:00
2018-12-20 08:53:23 -08:00
2019-03-03 23:45:27 +00:00
2018-06-03 17:37:15 -07:00
2019-03-29 10:01:37 -07:00
2019-02-12 15:27:14 -06:00
2019-04-11 15:41:14 -04:00
2019-03-01 20:53:41 +01:00
2019-03-16 13:05:32 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2015-08-05 13:38:07 +01:00
2012-10-08 13:50:20 +10:30
2018-06-15 18:10:01 -03:00
2019-01-31 14:20:54 +01:00
2019-02-08 06:42:53 -07:00
2019-03-15 11:25:48 -07:00
2018-06-17 08:27:01 +09:00
2018-11-01 11:00:46 +01:00
2016-10-11 15:06:31 -07:00
2017-11-02 11:10:55 +01:00
2017-11-07 10:32:44 +01:00
2019-03-05 21:07:21 -08:00
2018-07-04 10:32:48 +01:00
2019-03-05 21:07:14 -08:00
2019-04-08 08:19:41 -06:00
2018-10-31 08:54:12 -07:00
2019-03-07 18:32:00 -08:00
2019-04-05 16:02:30 -10:00
2018-06-21 12:52:11 +02:00
2019-03-18 10:44:48 -06:00
2019-04-10 09:57:33 -06:00
2019-03-20 14:02:07 -06:00
2019-02-07 12:57:17 -07:00
2019-03-13 12:04:35 -07:00
2019-03-08 21:17:07 +01:00
2019-03-13 12:04:35 -07:00
2019-03-26 11:24:47 -07:00
2018-10-02 22:20:50 -04:00
2017-11-17 16:10:01 -08:00
2019-03-07 18:31:59 -08:00
2019-04-08 08:19:41 -06:00
2017-11-02 11:10:55 +01:00
2018-06-05 18:06:24 +01:00
2019-03-07 12:20:11 -08:00
2017-11-02 11:10:55 +01:00
2019-03-07 10:11:41 -08:00
2019-02-22 00:11:47 -08:00
2017-11-02 11:10:55 +01:00
2019-03-05 21:07:20 -08:00
2018-01-08 17:30:45 +01:00
2008-04-30 08:29:54 -07:00
2019-01-18 13:52:41 +01:00
2017-11-02 11:10:55 +01:00
2018-04-11 10:28:38 -07:00
2013-12-29 15:25:48 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-01-30 19:27:00 +01:00
2019-02-23 12:13:45 +01:00
2015-11-16 09:27:32 +05:30
2017-11-28 15:24:02 +01:00
2017-11-02 11:10:55 +01:00
2019-03-07 18:32:01 -08:00
2017-11-02 11:10:55 +01:00
2016-04-15 11:20:32 -07:00
2016-09-06 13:08:40 +09:00
2018-12-11 11:40:13 +09:00
2019-03-05 14:53:50 -05:00
2019-03-18 07:07:30 +01:00
2019-01-04 09:02:17 +01:00
2019-03-10 12:47:57 -07:00
2018-07-30 10:50:22 +05:30
2018-03-16 19:58:27 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-03-07 18:32:00 -08:00
2017-11-15 11:56:19 -08:00
2019-03-10 10:17:23 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-02-28 03:28:53 -05:00
2017-11-02 11:10:55 +01:00
2018-01-01 12:40:27 -07:00
2019-02-22 12:55:31 -08:00
2019-02-24 17:33:59 -08:00
2018-12-01 23:13:14 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-03-12 18:59:17 -07:00
2019-01-16 17:42:35 +01:00
2017-08-07 17:22:14 +02:00
2013-09-26 15:06:58 -07:00
2019-02-28 08:24:23 -07:00
2019-03-06 07:59:36 -08:00
2017-11-02 11:10:55 +01:00
2018-05-14 16:44:41 +02:00
2017-11-02 11:10:55 +01:00
2019-03-05 21:07:18 -08:00
2019-02-28 03:29:37 -05:00
2019-02-28 03:28:53 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-04-06 07:01:55 -10:00
2019-01-23 23:56:43 -05:00
2012-10-13 10:46:48 +01:00
2017-11-02 11:10:55 +01:00
2019-01-04 13:13:46 -08:00
2019-03-12 10:04:02 -07:00
2018-12-20 09:51:31 -07:00
2017-11-02 11:10:55 +01:00
2019-03-05 21:07:16 -08:00
2016-05-28 15:48:31 -04:00
2017-11-02 11:10:55 +01:00
2019-01-29 12:09:11 +01:00
2019-03-12 10:04:00 -07:00
2019-03-29 10:01:37 -07:00
2018-03-08 12:30:37 +01:00
2019-02-24 14:43:22 +01:00
2019-02-22 12:56:24 -08:00
2019-03-09 19:52:47 -08:00
2019-02-04 17:36:01 -05:00
2018-03-26 08:53:43 -06:00
2018-10-29 20:26:06 -07:00
2019-02-04 08:53:56 +01:00
2018-11-07 13:42:32 -07:00
2019-01-14 11:42:18 +01:00
2014-05-14 16:40:04 -07:00
2019-02-23 10:53:31 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-02-24 08:20:17 -07:00
2019-03-01 11:24:51 +01:00
2019-01-22 17:18:08 -08:00
2019-03-03 21:05:10 -08:00
2019-03-21 11:52:37 +01:00
2019-02-23 10:53:31 +01:00
2019-03-08 10:09:53 -08:00
2019-03-05 21:07:13 -08:00
2019-03-28 10:58:28 +01:00
2019-03-04 13:42:05 +01:00
2017-11-02 11:10:55 +01:00
2019-04-03 11:43:49 +02:00
2017-11-02 11:10:55 +01:00
2019-03-12 14:08:19 -07:00
2018-12-13 17:54:12 -08:00
2012-07-21 10:34:00 -07:00
2018-08-18 11:44:53 -07:00
2019-03-05 21:07:15 -08:00
2019-03-06 08:14:05 -08:00
2019-03-16 13:05:32 -07:00
2018-02-02 16:50:28 -08:00
2019-03-07 18:31:59 -08:00
2019-03-29 10:01:37 -07:00
2019-02-28 07:55:53 +01:00
2018-04-12 09:41:19 -07:00
2019-03-12 14:08:19 -07:00
2019-03-07 18:32:03 -08:00
2018-12-21 22:31:26 -06:00
2017-11-02 11:10:55 +01:00
2019-02-24 17:45:25 -08:00
2017-11-02 11:10:55 +01:00
2019-02-05 11:51:56 -07:00
2019-03-12 10:04:02 -07:00
2019-04-05 16:02:31 -10:00
2019-03-11 17:08:14 -07:00
2018-06-21 16:14:45 +02:00
2019-03-27 22:49:06 -07:00
2017-11-17 20:21:44 -08:00
2019-01-04 13:13:48 -08:00
2019-04-05 16:02:31 -10:00
2019-04-14 15:09:40 -07:00
2019-03-05 21:07:21 -08:00
2019-03-10 13:16:37 -07:00
2019-03-09 09:56:17 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 13:46:33 -08:00
2019-01-30 17:44:24 -05:00
2017-11-02 11:10:55 +01:00
2018-06-07 17:34:39 -07:00
2018-03-24 11:25:35 -05:00
2018-05-15 08:11:15 +02:00
2018-03-15 07:17:21 -07:00
2019-03-15 15:29:47 -07:00
2019-02-16 13:45:01 -08:00
2019-03-02 12:54:35 -08:00
2019-03-01 16:20:16 -05:00
2019-03-01 16:20:16 -05:00
2019-03-01 16:20:16 -05:00
2018-08-17 16:20:29 -07:00
2019-03-05 21:07:20 -08:00
2019-04-11 17:28:30 +02:00
2019-02-08 15:02:49 -08:00
2018-09-08 11:19:28 +02:00
2018-01-08 08:22:45 -06:00
2018-01-08 08:22:45 -06:00
2019-02-28 11:40:49 -06:00
2018-07-08 11:13:25 +09:00
2018-08-08 09:47:26 -06:00
2017-10-07 12:10:32 +08:00
2019-03-05 21:07:19 -08:00
2019-03-29 10:01:37 -07:00
2019-03-15 11:21:25 -07:00
2019-03-25 14:49:00 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-09 10:23:28 +01:00
2018-09-18 17:52:15 -05:00
2019-02-28 11:09:29 +01:00
2019-03-10 12:29:52 -07:00
2019-02-28 07:55:37 +01:00
2019-02-28 08:29:50 +01:00
2019-03-03 21:47:57 -08:00
2019-02-24 12:39:45 -08:00
2019-03-07 18:31:59 -08:00
2019-04-14 15:09:40 -07:00
2018-05-09 11:51:46 +10:00
2019-03-08 10:09:53 -08:00
2019-03-06 12:59:46 -08:00
2019-02-01 11:53:35 +01:00
2019-03-12 09:43:00 +01:00
2019-03-07 11:23:17 +01:00
2019-03-12 10:04:03 -07:00
2017-09-08 18:26:51 -07:00
2019-03-09 09:22:42 -08:00
2019-03-05 17:03:53 +01:00
2017-11-02 11:10:55 +01:00
2019-04-04 09:17:15 -04:00
2017-11-02 11:10:55 +01:00
2018-02-12 11:43:25 -05:00
2018-08-02 17:33:06 -04:00
2017-11-02 11:10:55 +01:00
2019-02-09 08:44:32 -08:00
2018-07-17 09:27:43 +02:00
2019-03-07 18:32:03 -08:00
2018-03-27 10:39:47 +02:00
2019-01-07 16:38:26 +01:00
2015-02-05 15:09:25 +01:00
2018-06-15 13:37:07 +02:00
2019-02-22 13:49:00 +01:00
2019-03-13 09:46:10 -04:00
2017-05-03 15:52:09 -07:00
2017-11-02 11:10:55 +01:00
2018-06-03 17:37:11 -07:00
2019-02-25 21:20:45 +01:00
2018-07-25 11:22:19 +02:00
2018-09-25 20:17:35 -07:00
2019-03-22 11:01:02 -06:00
2019-03-07 12:20:11 -08:00
2018-09-10 17:37:06 +01:00
2017-11-02 11:10:55 +01:00
2019-03-12 14:08:19 -07:00
2018-03-22 21:30:56 -05:00
2018-04-11 10:28:36 -07:00
2017-12-04 10:52:54 -08:00
2018-08-20 09:22:45 -07:00
2017-11-02 11:10:55 +01:00
2019-03-05 21:07:18 -08:00
2017-12-19 09:26:00 +01:00
2018-05-17 12:46:54 -04:00
2019-03-11 08:54:01 -07:00
2019-03-29 10:01:37 -07:00
2019-03-05 21:07:14 -08:00
2019-03-15 15:29:47 -07:00
2017-11-02 11:10:55 +01:00
2019-02-09 08:47:52 -08:00
2016-03-25 16:37:42 -07:00
2017-11-02 11:10:55 +01:00
2018-10-09 11:20:55 +02:00
2018-06-05 16:57:31 -07:00
2017-11-02 11:10:55 +01:00
2018-05-15 21:47:09 +03:00
2019-04-05 16:02:30 -10:00
2018-04-28 15:01:14 -07:00
2009-04-10 15:48:52 +02:00
2019-03-14 14:36:20 -07:00
2019-03-10 12:47:57 -07:00
2019-02-11 07:36:13 -05:00
2017-08-18 14:07:26 -03:00
2017-11-02 11:10:55 +01:00
2019-03-16 13:47:14 -07:00
2011-03-15 00:43:46 +01:00
2018-02-06 18:32:47 -08:00
2017-11-02 11:10:55 +01:00
2019-02-28 13:49:29 +01:00
2018-05-25 12:27:53 +01:00
2017-11-02 11:10:55 +01:00
2018-06-24 14:39:46 +02:00
2018-12-18 16:13:05 +01:00
2018-04-17 17:18:04 +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
2015-02-03 12:48:43 -05:00
2018-11-12 04:53:27 +01:00
2018-09-14 11:19:30 -04:00
2019-03-07 18:31:59 -08:00
2019-03-23 10:25:12 -07:00
2018-12-05 21:20:14 +01:00
2017-11-02 11:10:55 +01:00
2019-03-28 01:55:18 +09:00
2019-03-07 10:34:37 +01:00
2019-03-06 11:19:57 -05:00
2019-02-24 12:06:19 -08:00
2019-04-08 17:05:52 -04:00
2019-03-06 11:19:15 -05:00
2018-06-05 12:16:51 -07:00
2019-02-26 12:53:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-03 09:25:47 -06:00
2019-02-11 08:34:04 +01:00
2017-11-02 11:10:55 +01:00
2019-03-07 08:46:07 -08:00
2019-03-06 14:52:48 -08:00
2018-12-07 22:26:37 -07:00
2019-02-20 17:08:54 -05:00
2017-08-15 09:02:08 -07:00