summaryrefslogtreecommitdiffstats
path: root/samples/sockmap/sockmap_kern.c
diff options
context:
space:
mode:
authorGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>2017-10-20 21:27:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-23 11:34:42 +0200
commitde4ce2d1ad1bb3304d4107160c9551b7fd8d8ec5 (patch)
tree83bac440666d3ebb2f92c079d6310a265d3fa91e /samples/sockmap/sockmap_kern.c
parentlkdtm: Constify the crashtypes table (diff)
downloadlinux-de4ce2d1ad1bb3304d4107160c9551b7fd8d8ec5.tar.xz
linux-de4ce2d1ad1bb3304d4107160c9551b7fd8d8ec5.zip
genwqe: Take R/W permissions into account when dealing with memory pages
Currently we assume userspace pages are always writable when doing memory pinning. This is not true, specially since userspace applications may allocate their memory the way they want, we have no control over it. If a read-only page is set for pinning, currently the driver fails due to get_user_pages_fast() refusing to map read-only pages as writable. This patch changes this behavior, by taking the permission flags of the pages into account in both pinning/unpinning process, as well as in the DMA data copy-back to userpace (which we shouldn't try to do blindly, since it will fail in case of read-only-pages). Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples/sockmap/sockmap_kern.c')
0 files changed, 0 insertions, 0 deletions