From: Michael Ellerman <mpe@ellerman.id.au>
To: Ian Munsie <imunsie@au1.ibm.com>
Cc: Matt Ochs <mrochs@us.ibm.com>,
linuxppc-dev <linuxppc-dev@ozlabs.org>, mikey <mikey@neuling.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Ian Munsie <imunsie@au1.ibm.com>
Subject: Re: [2/2] cxl: Fix force unmapping mmaps of contexts allocated through the kernel api
Date: Mon, 31 Aug 2015 07:20:41 +1000 (AEST) [thread overview]
Message-ID: <20150830212042.0C2DB140273@ozlabs.org> (raw)
In-Reply-To: <1440669019-23800-2-git-send-email-imunsie@au.ibm.com>
On Thu, 2015-27-08 at 09:50:19 UTC, Ian Munsie wrote:
> From: Ian Munsie <imunsie@au1.ibm.com>
>
> The cxl user api uses the address_space associated with the file when we
> need to force unmap all cxl mmap regions (e.g. on eeh, driver detach,
> etc). Currently, contexts allocated through the kernel api do not do
> this and instead skip the mmap invalidation, potentially allowing them
> to poke at the hardware after such an event, which may cause all sorts
> of trouble.
>
> This patch allocates an address_space for cxl contexts allocated through
> the kernel api so that the same invalidate path will for these contexts
> as well. We don't use the anonymous inode's address_space, as doing so
> could invalidate any mmaps of completely unrelated drivers using
> anonymous file descriptors.
>
> This patch also introduces a kernelapi flag, so we know when freeing the
> context if the address_space was allocated by us and needs to be freed.
>
> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/55e07668fbba9466e6a9ef76
cheers
next prev parent reply other threads:[~2015-08-30 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 9:50 [PATCH 1/2] cxl: Fix + cleanup error paths in cxl_dev_context_init Ian Munsie
2015-08-27 9:50 ` [PATCH 2/2] cxl: Fix force unmapping mmaps of contexts allocated through the kernel api Ian Munsie
2015-08-30 21:20 ` Michael Ellerman [this message]
2015-08-30 21:20 ` [1/2] cxl: Fix + cleanup error paths in cxl_dev_context_init Michael Ellerman
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=20150830212042.0C2DB140273@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=mrochs@us.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).