Re: [PATCH 01/32] mm, gup: introduce concept of "foreign" get_user_pages()
From: Vlastimil Babka
Date: Tue Jan 05 2016 - 05:51:49 EST
On 12/14/2015 08:05 PM, Dave Hansen wrote:
From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
For protection keys, we need to understand whether protections
should be enforced in software or not. In general, we enforce
protections when working on our own task, but not when on others.
We call these "current" and "foreign" operations.
This introduces two new get_user_pages() variants:
get_current_user_pages()
get_foreign_user_pages()
get_current_user_pages() is a drop-in replacement for when
get_user_pages() was called with (current, current->mm, ...) as
arguments. Using it makes a few of the call sites look a bit
nicer.
get_foreign_user_pages() is a replacement for when
get_user_pages() is called on non-current tsk/mm.
We leave a stub get_user_pages() around with a __deprecated
warning.
Changelog doesn't mention that get_user_pages_unlocked() is also changed
to be effectively get_current_user_pages_unlocked(). It's a bit
non-obvious and the inconsistent naming is unfortunate, but I can see
how get_current_user_pages_unlocked() would be too long, and just
deleting the parameters from get_user_pages() would be too large and
intrusive. But please mention this in changelog?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/