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 misc/genwqe: ensure zero initialization 2016-09-27 12:43:35 +02:00
card_ddcb.h GenWQE: Update author information 2014-09-23 23:15:46 -07:00
card_debugfs.c GenWQE: Support blocking when DDCB queue is busy 2014-09-23 23:15:47 -07:00
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 GenWQE: use kobj_to_dev() 2016-02-08 14:57:30 -08:00
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 GenWQE: Update author information 2014-09-23 23:15:46 -07:00
Kconfig GenWQE: Add support for EEH error recovery 2014-07-09 14:14:27 -07:00
Makefile GenWQE Enable driver 2013-12-18 16:51:15 -08:00