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-03-17 09:10:56 -07:00
2019-03-28 08:54:20 -07:00
2019-04-11 14:19:02 -07:00
2019-03-09 10:54:24 -08:00
\n
2019-03-07 09:01:33 -08:00
2019-03-15 13:42:53 -07:00
2018-11-30 14:56:14 -08:00
2018-08-17 16:20:28 -07:00
2018-09-29 22:47:48 -04:00
2018-10-29 14:29:58 -07:00
2019-03-01 17:24:48 -08:00
2019-03-07 18:32:01 -08:00
2019-03-08 14:48:40 -08:00
2019-03-18 10:44:48 -06:00
2019-01-30 17:44:07 -05:00
2019-02-07 16:38:35 +01:00