From patchwork Wed Sep 13 18:49:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9951895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5407E603F4 for ; Wed, 13 Sep 2017 18:53:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4868528C64 for ; Wed, 13 Sep 2017 18:53:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D49028C71; Wed, 13 Sep 2017 18:53:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97F3A28C64 for ; Wed, 13 Sep 2017 18:53:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsCje-000637-05; Wed, 13 Sep 2017 18:50:05 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsCjc-0005y7-LN for xen-devel@lists.xenproject.org; Wed, 13 Sep 2017 18:50:04 +0000 Received: from [85.158.137.68] by server-6.bemta-3.messagelabs.com id 77/19-02225-BDD79B95; Wed, 13 Sep 2017 18:50:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOIsWRWlGSWpSXmKPExsUyZ7p8oO7t2p2 RBhfXiFh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmrd31lLtjBWTFlymSmBsaP7F2MXBxCApOZ JLaf2MMK4fxllHi+az8ThLOBUeLMk20sEM42RolbDW1AGU4OYYEQiW/dp5hBbBGBeInlL18wQ hTdZ5KYd2cu2GBmgQ5GicvXO8E62ASMJM4enc4IYvMK2EocWn6eHcRmEVCVODLrLVhcVCBc4m 3jERaIGkGJkzOfgNmcAtYSPe9PsYHYzAJ6Ejuu/2KFsOUltr+dA3aFhICxRPvbi2wTGAVnIWm fhaRlFpKWBYzMqxg1ilOLylKLdI0M9ZKKMtMzSnITM3N0DQ2M9XJTi4sT01NzEpOK9ZLzczcx AgO4noGBcQdjz16/Q4ySHExKorx7dXdGCvEl5adUZiQWZ8QXleakFh9ilOHgUJLgfVQDlBMsS k1PrUjLzAHGEkxagoNHSYT3CUiat7ggMbc4Mx0idYpRUUqcVwEYgUICIImM0jy4Nlj8XmKUlR LmZWRgYBDiKUgtys0sQZV/xSjOwagkzPseZDxPZl4J3PRXQIuZgBafOb0DZHFJIkJKqoHRo0N nf/CbLZMUl64/pnZ+OkfJeremswxvU+9vn+MuqBYRcLzpya2rcyqbPtzY8DfxwA/9/eEaBnId 1XbVXQeqvS/m7YhO+W124lVkL1PBzCvpV94kBTv23eHeMrWV77qSgOZugVlaKv6N+/5nxt16x 6rscmZF/euQU8d8l1ime5VPF2cvXn1ViaU4I9FQi7moOBEACIylgNoCAAA= X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1505328601!59177074!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26025 invoked from network); 13 Sep 2017 18:50:03 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-9.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 13 Sep 2017 18:50:03 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v8DInpJj027335 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Sep 2017 18:49:52 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8DInpkL032732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Sep 2017 18:49:51 GMT Received: from ubhmp0011.oracle.com (ubhmp0011.oracle.com [156.151.24.64]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8DInoxP032336; Wed, 13 Sep 2017 18:49:50 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Sep 2017 18:49:50 +0000 To: Julien Grall , Konrad Rzeszutek Wilk References: <20170911235520.GA30969@localhost.localdomain> <7b76a7a2-90fd-f016-53b0-a36ef68ba1a4@oracle.com> <20170913000147.GA6632@localhost.localdomain> <3d92481c-bdfb-f46a-cc52-c8d3e820d9b2@oracle.com> <20170913153242.GA11299@char.us.oracle.com> <7b4b9adb-093e-0729-1b17-0eca6ab462b9@oracle.com> <4c1fb949-473b-e631-4c45-31f5f6299cee@arm.com> From: Boris Ostrovsky Message-ID: <3f8bc778-c193-4405-69bc-1df7b062b2f3@oracle.com> Date: Wed, 13 Sep 2017 14:49:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <4c1fb949-473b-e631-4c45-31f5f6299cee@arm.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: dario.faggioli@citrix.com, sstabellini@kernel.org, xen-devel@lists.xenproject.org Subject: Re: [Xen-devel] CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 09/13/2017 02:25 PM, Julien Grall wrote: > Hi, > > On 09/13/2017 07:05 PM, Boris Ostrovsky wrote: >> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote: >> Well, that's not a fix. This eliminates the case that something in >> ARM-specific code (which I haven't tested) accidentally clears >> _PGC_need_scrub. >> >> OK, I think I know what the problem is. You are using >> CONFIG_SEPARATE_XENHEAP, are you? > > It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set. > > Note that Arm32 is using separate heap. For separate heap we will need If that doesn't help then there are two cases where free_heap_pages is called with 'false' --- one in alloc_domheap_pages() and the other in online_page(). Setting one and then the other would further narrow it down. -boris diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index b5243fc..9f62ea2 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2059,7 +2059,7 @@ void free_xenheap_pages(void *v, unsigned int order) memguard_guard_range(v, 1 << (order + PAGE_SHIFT)); - free_heap_pages(virt_to_page(v), order, false); + free_heap_pages(virt_to_page(v), order, scrub_debug); } #else