[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free


  • To: David Vrabel <dvrabel@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 25 Apr 2022 15:30:50 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dM3QqwvkL/RyYaonWo+r0tMrDZssVgCQBPKVMgMSKlk=; b=W1sDamvE2I2Ej+7wt3TA1fCyNINcq8E0YyfFU5+v8yaHus2+eJ2Z83clAVt7ueokiphU6C7cQKU9q54WbaiKiXYPLh07oPfFLC8yS0WTIB9Q2/Mp4miGiLhmTS3A8Lw/Szx8qvQPkYqJ2dqXdkzO+d87xg8ijNaPdW3bfHGWzXtVHTWl/f0fVFXfpraOQLw+hK2Hb0zbxOw/oSEob/GkX1rGgQpk5WbYe4Px8T5wL41aLG6upIm5LG8uR4mBWKtiJFEEPRcf4XKS8Pxpf/udo/rG3ay0LxNw65X/Qp7UQSZQ4w3LhHjepQfN8LSkSeDJuTVaSRIs+yxu8H1AurTUuA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WX1RbCXg7LRbPasKbYP/Zu99lZLMBTqJBKGQTREPvjtcU61cy85Z+PhYZvHEvd6nZmcu4LisUahhvDOaT2mHzNthaPqouYm9kr9s8GFuI378ZeH7xKmYmVobZ6w5y7OdCcpR4YGGpYBJ0xfZxd4/yuJCQulObkSdoD+fmKjncUNsc1FfUuGIQza+pOjClqMl4t8XzcbF18oFARtSGE4EcpZjUloGcVro525iAaa9kfKKEuV6wKYZkT4qoQXvG0MPGWrYe1PU2r4NXRrx7pgJy5MUoblK9k8kcD/5ZTc5r7WRwR5q+DcZwF1pdny7/xyfWioOHRfuOShAI/3sytnIOg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, David Vrabel <dvrabel@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 25 Apr 2022 13:31:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.04.2022 15:28, David Vrabel wrote:
> From: David Vrabel <dvrabel@xxxxxxxxxxxx>
> 
> Heap pages can only be safely allocated and freed with interuupts
> enabled as they may require a TLB flush which will send IPIs (on x86).
> 
> Normally spinlock debugging would catch calls from the incorrect
> context, but not from stop_machine_run() action functions as these are
> called with spin lock debugging disabled.
> 
> Enhance the assertions in alloc_xenheap_pages() and
> alloc_domheap_pages() to check interrupts are enabled. For consistency
> the same asserts are used when freeing heap pages.
> 
> As an exception, when only 1 PCPU is online, allocations are permitted
> with interrupts disabled as any TLB flushes would be local only. This
> is necessary during early boot.
> 
> Signed-off-by: David Vrabel <dvrabel@xxxxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.