Thread (38 messages) 38 messages, 7 authors, 2016-10-20

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

From: Michal Hocko <mhocko@kernel.org>
Date: 2016-10-19 09:07:28
Also in: ceph-devel, dri-devel, intel-gfx, kvm, linux-alpha, linux-arm-kernel, linux-fbdev, linux-fsdevel, linux-media, linux-mips, linux-mm, linux-rdma, linux-s390, linux-samsung-soc, linux-scsi, linux-sh, linuxppc-dev, lkml, sparclinux

On Wed 19-10-16 09:58:15, Lorenzo Stoakes wrote:
On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote:
quoted
I am wondering whether we can go further. E.g. it is not really clear to
me whether we need an explicit FOLL_REMOTE when we can in fact check
mm != current->mm and imply that. Maybe there are some contexts which
wouldn't work, I haven't checked.
This flag is set even when /proc/self/mem is used. I've not looked deeply into
this flag but perhaps accessing your own memory this way can be considered
'remote' since you're not accessing it directly. On the other hand, perhaps this
is just mistaken in this case?
My understanding of the flag is quite limited as well. All I know it is
related to protection keys and it is needed to bypass protection check.
See arch_vma_access_permitted. See also 1b2ee1266ea6 ("mm/core: Do not
enforce PKEY permissions on remote mm access").

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help