Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2300168imc; Tue, 12 Mar 2019 10:55:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwt42TXBq1xhPjYkz7ljib/Te4EBoxhsmErv4wmQxsHZEowEACUqQohyA7Fk1bNJp9itvM X-Received: by 2002:aa7:8b12:: with SMTP id f18mr3108841pfd.240.1552413305723; Tue, 12 Mar 2019 10:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552413305; cv=none; d=google.com; s=arc-20160816; b=YQXs0f2QA5yCaX5JjTevMrSoy4EQNfdEd5PftKXwAVwnD6vwIZ0jmkZTYX7Sz2xnAE Z+q7SOB7G6rA1bT6U9TygTn0oaS0CsPKFyV+RL1YwztuBwaQ3878jN4MiP25084hb1m1 fNyftaszSg+pYktOrtM9GDyPs83z+rBzNllN79UBwhsvYffHdUMTeyK4agyt+x97qUXo qUy8Nf9bZ1rvEGDBD3nVr0vn7GvTNZmO+pxwXPaUYdo/YQyQEGLeDoVNH3DEoYxnmvNX vtf33F3Ip0bYQgt05UxNDf3yMtp/t5JF7DzTuY/5zRR6bgLpbvFQcs90M+aqSCiPHWx5 WSkA== 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; bh=230SxmBFj0CarYJqxw8BlXT5FM8fCROKpq+2bHkGdlo=; b=OzKeQgP7OiPLUPJl6Wzz7uQYIShrIpMYt4YCqoP1XrkX0EzirYQHQp186Ky2GURZEJ eyrehlLqBQsd+TVUu/+a9BDr5jR9RPglRlYwib9sOeCq/L/7P9RIwcVcmiDBM9KDAbz6 7YGFiq8OYEC6+dDW3RWnz2feFM9pUnrxL49g87G91hc9sVxlbqWhqzNHSQqvji09oB13 P9g4S8oLUdz4bZHhJNdBPDiVwF5+SIaD9T1V7niRHsxwjx2WXkRYdA6s5442lHsi4Umw 0aNO7tdWU+MxjIe5qd27aYzVZq8IlRi9yXFjIvcCq1gBdNSYXQmL8cA2cAaxXEjN/9Jn q3gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Tj32NjeP; 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 i6si7785466pgq.423.2019.03.12.10.54.49; Tue, 12 Mar 2019 10:55:05 -0700 (PDT) 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=Tj32NjeP; 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 S1728445AbfCLRwk (ORCPT + 99 others); Tue, 12 Mar 2019 13:52:40 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52404 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726692AbfCLRO0 (ORCPT ); Tue, 12 Mar 2019 13:14:26 -0400 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=230SxmBFj0CarYJqxw8BlXT5FM8fCROKpq+2bHkGdlo=; b=Tj32NjePxjUsmkEjqkLxiHNw1 Dq2MT3TJlBRfi3Y5NnjBDk0s0EweaLHROW2FkBIoagTnzjZwu+62Z2k4cmXZ6xvKO8tCqVCbwC89M O2TZMeFtNgncUjsUqA1sOGxk+SAcb02OrfpORBguPKFKQJ/hAusPAJWA6fW2vYc5q7UcQDbcEmG+S 9JXb7vu5bfU6tS7C1pdEq2NV91qD7Kfb4ts7F82G3nJzFeoLZZnr4pJuMf9288awplKXHtCxo5dzu 68dviPy441t94N5Oh+B+hxojBIzgjeJr2PJguSlyYWR8Zs61GC361dQWAHggIPssoaARwY7ZMqZpc aSxcGtrsQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3kyr-0002MN-ID; Tue, 12 Mar 2019 17:14:21 +0000 Date: Tue, 12 Mar 2019 10:14:21 -0700 From: Matthew Wilcox To: Julien Grall Cc: osstest service owner , xen-devel@lists.xenproject.org, Juergen Gross , Konrad Rzeszutek Wilk , Boris Ostrovsky , Stefano Stabellini , "linux-kernel@vger.kernel.org" , Kees Cook , david@redhat.com, k.khlebnikov@samsung.com, Julien Freche , Nadav Amit , "VMware, Inc." , linux-mm@kvack.org Subject: Re: xen: Can't insert balloon page into VM userspace (WAS Re: [Xen-devel] [linux-linus bisection] complete test-arm64-arm64-xl-xsm) Message-ID: <20190312171421.GJ19508@bombadil.infradead.org> References: <80211e70-5f54-9421-8e8f-2a4fc758ce39@arm.com> <46118631-61d4-adb6-6ffc-4e7c62ea3da9@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46118631-61d4-adb6-6ffc-4e7c62ea3da9@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 12, 2019 at 05:05:39PM +0000, Julien Grall wrote: > On 3/12/19 3:59 PM, Julien Grall wrote: > > It looks like all the arm test for linus [1] and next [2] tree > > are now failing. x86 seems to be mostly ok. > > > > The bisector fingered the following commit: > > > > commit 0ee930e6cafa048c1925893d0ca89918b2814f2c > > Author: Matthew Wilcox > > Date: Tue Mar 5 15:46:06 2019 -0800 > > > > mm/memory.c: prevent mapping typed pages to userspace > > Pages which use page_type must never be mapped to userspace as it would > > destroy their page type. Add an explicit check for this instead of > > assuming that kernel drivers always get this right. Oh good, it found a real problem. > It turns out the problem is because the balloon driver will call > __SetPageOffline() on allocated page. Therefore the page has a type and > vm_insert_pages will deny the insertion. > > My knowledge is quite limited in this area. So I am not sure how we can > solve the problem. > > I would appreciate if someone could provide input of to fix the mapping. I don't know the balloon driver, so I don't know why it was doing this, but what it was doing was Wrong and has been since 2014 with: commit d6d86c0a7f8ddc5b38cf089222cb1d9540762dc2 Author: Konstantin Khlebnikov Date: Thu Oct 9 15:29:27 2014 -0700 mm/balloon_compaction: redesign ballooned pages management If ballooned pages are supposed to be mapped into userspace, you can't mark them as ballooned pages using the mapcount field.