[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171021075146.GA21399@kroah.com>
Date: Sat, 21 Oct 2017 09:51:46 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: "Guilherme G. Piccoli" <gpiccoli@...ux.vnet.ibm.com>
Cc: arnd@...db.de, linux-kernel@...r.kernel.org,
haver@...ux.vnet.ibm.com
Subject: Re: [PATCH] genwqe: Take R/W permissions into account when dealing
with memory pages
On Fri, Oct 20, 2017 at 05:27:49PM -0200, Guilherme G. Piccoli wrote:
> 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@...ux.vnet.ibm.com>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@...ux.vnet.ibm.com>
> ---
>
> Arnd/Greg, we found this bug recently, although not critical,
> it's really a boring issue affecting driver functionality.
> If it's possible to take this patch still on v4.14, we'd be
> really thankful!
> But we know it's late, so if not possible, v4.15 is cool.
Is this a regression? It seems like it's just a "fix something that has
always been broken but no one has noticed yet" type of thing, right?
thanks,
greg k-h
Powered by blists - more mailing lists