alistair23-linux/drivers/misc/genwqe
Guilherme G. Piccoli de4ce2d1ad 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>
2017-10-23 11:34:42 +02:00
..
card_base.c genwqe: drop .link_reset() 2017-01-11 09:21:41 +01:00
card_base.h genwqe: Take R/W permissions into account when dealing with memory pages 2017-10-23 11:34:42 +02:00
card_ddcb.c
card_ddcb.h
card_debugfs.c
card_dev.c genwqe: Take R/W permissions into account when dealing with memory pages 2017-10-23 11:34:42 +02:00
card_sysfs.c
card_utils.c genwqe: Take R/W permissions into account when dealing with memory pages 2017-10-23 11:34:42 +02:00
genwqe_driver.h
Kconfig
Makefile