All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, haver@linux.vnet.ibm.com
Subject: Re: [PATCH] genwqe: Take R/W permissions into account when dealing with memory pages
Date: Sat, 21 Oct 2017 09:51:46 +0200	[thread overview]
Message-ID: <20171021075146.GA21399@kroah.com> (raw)
In-Reply-To: <20171020192749.20194-1-gpiccoli@linux.vnet.ibm.com>

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@linux.vnet.ibm.com>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.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

  reply	other threads:[~2017-10-21  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 19:27 [PATCH] genwqe: Take R/W permissions into account when dealing with memory pages Guilherme G. Piccoli
2017-10-21  7:51 ` Greg KH [this message]
2017-10-22 13:25   ` Guilherme G. Piccoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171021075146.GA21399@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=haver@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.