Received: by 10.223.164.202 with SMTP id h10csp239156wrb; Tue, 14 Nov 2017 21:55:44 -0800 (PST) X-Google-Smtp-Source: AGs4zMZeLqRbSinv00YsEVPgAOxWTbRCQHneDUeG8PH12IpywtBfWCLNPy2FPO9+NFqxOkZxehtx X-Received: by 10.84.228.193 with SMTP id y1mr14880844pli.404.1510725344038; Tue, 14 Nov 2017 21:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510725344; cv=none; d=google.com; s=arc-20160816; b=nngpNVhnz6EFwwt4e71oB26roIWvbQt9nkTGl8JifPpHODlLD7CZnjukgFkzlyXp5O YMUnvp4g5cMXKkDzsZzm9SN1jvNjzJh9iSOWd7N0iAu+gaCyRGCvTWxUDRdcJ/N95h5A HxBnTN3EkztG9b1gKjkUXd9hEmsDzerzbOLAiK22a5KazLlpbtDcX5MyPTYFVg/U6jRx SO8g0Y+2e2bdf19y+gFpBDw3KB5AmBBvaxqT6/FqSq9piVRqEEAZwWRItyzzoZI0Wp0n 5XA84AIioay/hjW4lFk77zY4LgPzKVExOI+SvWe5eZ7G/bqERqhCL/9oOAj2DSN4D/zn yTOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=+eaN49C7YP9XPsLc/MFHJZCpXGxlfOBjGG4qnG7FD3U=; b=iFT27r0cSAcCAsN/ESzEOCtZ3jFbfz4SddX5aaI/hIgb/MSxmOrsS116tMoucjiedU neeCPJ8553lG7SVLtvVvNxIyd61qblxfkieL1V5xzfsGC/5NlBy7IPNWLJrVI/tSS2/0 a/hq1/eO7W8HXwr0Z2R6tRcBnp62Oh2RdtMiv3wUQ9cH23X8sLX6C5xLmMos93JXkUjH t8BBP1lB6TWFtsgeoLkBlle98Tzlqd32Zc29NEa/kAPJ+zPfGijAKX76QSJKmwAF+Jgi m3YQ4wftdFS2LlspriHPye5BFtuz3ist8rePiLK6tAdVFaAsAHUHBYzBsZEuIuaJAvxN lcpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JE1fH8AV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si11283400pgv.558.2017.11.14.21.55.31; Tue, 14 Nov 2017 21:55:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JE1fH8AV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754860AbdKODoj (ORCPT + 88 others); Tue, 14 Nov 2017 22:44:39 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:59645 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752552AbdKODoc (ORCPT ); Tue, 14 Nov 2017 22:44:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+eaN49C7YP9XPsLc/MFHJZCpXGxlfOBjGG4qnG7FD3U=; b=JE1fH8AV6soyoxZXM9nELJptq OpVDLnJ9FzVy9OeKvd5bOEc2VpPHV8NUeA2DJMsxMNapRm13vNpjlTrDsgqhM596X/Ce2sUOpocBQ rs8E7d2pO0QoJ5s1XOFPIUsgFNBgIAOZo7kmFKel7DZI6aW538YHQ2vr3PPEZKpFm34cp/F2Ab8uI rGudoDruHdG4UG/J5cXuuKi3m7CdHecbuELjU3oxNgYO9GufjKWFcOdlAUuJpRL+EgIpllKNgb8Sc XGlO2ikyLAyw9OTDWmmvXqq0uPnQOWFwxVOHmnnAKvXzSp4GDUxz4Tbq+bGanLLbfXE+PzhPSyfeY Q7TQXV7eQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1eEoco-0004TU-2I; Wed, 15 Nov 2017 03:44:30 +0000 Date: Tue, 14 Nov 2017 19:44:30 -0800 From: Matthew Wilcox To: Dave Hansen Cc: Tycho Andersen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, Marco Benatto , Juerg Haefliger , x86@kernel.org Subject: Re: [PATCH v6 03/11] mm, x86: Add support for eXclusive Page Frame Ownership (XPFO) Message-ID: <20171115034430.GA24257@bombadil.infradead.org> References: <20170907173609.22696-1-tycho@docker.com> <20170907173609.22696-4-tycho@docker.com> <34454a32-72c2-c62e-546c-1837e05327e1@intel.com> <20170920223452.vam3egenc533rcta@smitten> <97475308-1f3d-ea91-5647-39231f3b40e5@intel.com> <20170921000901.v7zo4g5edhqqfabm@docker> <20171110010907.qfkqhrbtdkt5y3hy@smitten> <7237ae6d-f8aa-085e-c144-9ed5583ec06b@intel.com> <2aa64bf6-fead-08cc-f4fe-bd353008ca59@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2aa64bf6-fead-08cc-f4fe-bd353008ca59@intel.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2017 at 02:46:25PM -0800, Dave Hansen wrote: > On 11/13/2017 02:20 PM, Dave Hansen wrote: > > On 11/09/2017 05:09 PM, Tycho Andersen wrote: > >> which I guess is from the additional flags in grow_dev_page() somewhere down > >> the stack. Anyway... it seems this is a kernel allocation that's using > >> MIGRATE_MOVABLE, so perhaps we need some more fine tuned heuristic than just > >> all MOVABLE allocations are un-mapped via xpfo, and all the others are mapped. > >> > >> Do you have any ideas? > > > > It still has to do a kmap() or kmap_atomic() to be able to access it. I > > thought you hooked into that. Why isn't that path getting hit for these? > > Oh, this looks to be accessing data mapped by a buffer_head. It > (rudely) accesses data via: > > void set_bh_page(struct buffer_head *bh, > ... > bh->b_data = page_address(page) + offset; We don't need to kmap in order to access MOVABLE allocations. kmap is only needed for HIGHMEM allocations. So there's nothing wrong with ext4 or set_bh_page(). From 1584094878440184708@xxx Wed Nov 15 01:50:00 +0000 2017 X-GM-THRID: 1577903505730930323 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread