[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: alternative: Don't call vmap() within stop_machine_run()
- To: Julien Grall <julien@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 27 Apr 2022 08:42:26 +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=yTJXMMcoQiypeivkIZdPtIMIr8CDJ5JMmO2GxSpbJ6I=; b=NgzXRfXqFVEOojZ6Ie/530jglEITw+oFsFloex5aBHdNVDtivQvHiEd8IWbQOHasNQyzIbU3m/kAro5O5LJApCP0NrAs2TY8M7KEANHO61eKMDJcXgPgFN+srH4TuO0WIRcU+ZncXNQi0YEL+nPCrcjc676j9VbzxEHQeOdqQfsgqO8PnNd3S6pAIs2ZZKB6OQL9BduI8K7Y2y6XmLvOa2/iJhvz84FIzJNLRLx02e/pBsVJAV3S+vwLJITktn1TFim6Z35oX/xDBGKNEa9dLzY/zBACurixj/pFD/dn4m6Bizc2+Gl+UL79L2pGXO0gLQwGQ6GGCq2gKgu5uYP8+Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ODmGsZ6LD3qsnzB00qrpwwHdo84mtwiuLwozWXEsrrwZtf2Aq050oDdJsAkku5kcEFn3TsRBWGahYsdx9MHIw2AsA094a0cmDlBpA1sM3YscM4BT0zevs8MnnK9vKv5gSF/ApRpLws7AzWPL3fcCD8nVwgmRReVueNNIYMJrbPiTgTW7hId3wZkLFUGdQhiNsAMdrvGdOMT/Ke1p17yc5uPHzIi+GrqZPoGyMMKyB9Dw0B1SXo8Adz03p0FCHpyNSDs0kQbYAmdrhyi/M5CYK/I4iZLAk9A5Y4iQgq5CFbJpBNAt9tamtploYKWt23V30pVsmqZJ2js7KE3+3jzVkw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, David Vrabel <dvrabel@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 27 Apr 2022 06:42:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 26.04.2022 22:06, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> Commit 88a037e2cfe1 "page_alloc: assert IRQs are enabled in heap
> alloc/free" extended the checks in the buddy allocator to catch
> any use of the helpers from context with interrupts disabled.
>
> Unfortunately, the rule is not followed in the alternative code and
> this will result to crash at boot with debug enabled:
>
> (XEN) Xen call trace:
> (XEN) [<0022a510>] alloc_xenheap_pages+0x120/0x150 (PC)
> (XEN) [<00000000>] 00000000 (LR)
> (XEN) [<002736ac>] arch/arm/mm.c#xen_pt_update+0x144/0x6e4
> (XEN) [<002740d4>] map_pages_to_xen+0x10/0x20
> (XEN) [<00236864>] __vmap+0x400/0x4a4
> (XEN) [<0026aee8>]
> arch/arm/alternative.c#__apply_alternatives_multi_stop+0x144/0x1ec
> (XEN) [<0022fe40>] stop_machine_run+0x23c/0x300
> (XEN) [<002c40c4>] apply_alternatives_all+0x34/0x5c
> (XEN) [<002ce3e8>] start_xen+0xcb8/0x1024
> (XEN) [<00200068>] arch/arm/arm32/head.o#primary_switched+0xc/0x1c
>
> The interrupts will be disabled by the state machine in stop_machine_run(),
> hence why the ASSERT is hit.
>
> For now the patch extending the checks has been reverted, but it would
> be good to re-introduce it (allocation with interrupts disabled is not
> desirable).
We definitely should re-apply that patch once the one here went in.
Jan
|