Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbbH3VUo (ORCPT ); Sun, 30 Aug 2015 17:20:44 -0400 Received: from ozlabs.org ([103.22.144.67]:49824 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbbH3VUn (ORCPT ); Sun, 30 Aug 2015 17:20:43 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 55e07668fbba9466e6a9ef7650718356cda38406 In-Reply-To: <1440669019-23800-2-git-send-email-imunsie@au.ibm.com> To: Ian Munsie From: Michael Ellerman Cc: Matt Ochs , linuxppc-dev , mikey , linux-kernel , Ian Munsie Subject: Re: [2/2] cxl: Fix force unmapping mmaps of contexts allocated through the kernel api Message-Id: <20150830212042.0C2DB140273@ozlabs.org> Date: Mon, 31 Aug 2015 07:20:41 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1349 Lines: 31 On Thu, 2015-27-08 at 09:50:19 UTC, Ian Munsie wrote: > From: Ian Munsie > > 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 Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/55e07668fbba9466e6a9ef76 cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/