Linus Torvalds writes: (Summary) wrote:
That sounds wrong.
That sounds wrong.
We actually had some very serious reasons why get_user_pages_fast() needed to check access_ok().
needed to check access_ok().
I happen to forget what those reasons were, though. My mind may be going.
My mind may be going.
But I think it was something like "you could walk off the page tables because the undefined address range generates nonsensical values for the pgd_offset() functions" etc.
the pgd_offset() functions" etc.
But maybe the regular get_user_pages() has some other way to protect against that.
against that.
Linus
Linus
Linus
[...]
foreign mm.That sounds wrong.
That sounds wrong.
We actually had some very serious reasons why get_user_pages_fast() needed to check access_ok().
needed to check access_ok().
I happen to forget what those reasons were, though. My mind may be going.
My mind may be going.
But I think it was something like "you could walk off the page tables because the undefined address range generates nonsensical values for the pgd_offset() functions" etc.
the pgd_offset() functions" etc.
But maybe the regular get_user_pages() has some other way to protect against that.
against that.
Linus
Linus
Linus