From nobody Mon May 25 12:44:02 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linutronix.de ARC-Seal: i=1; a=rsa-sha256; t=1777969382; cv=none; d=zohomail.com; s=zohoarc; b=YX0KOAIlYs8EOWWpX17dbIqEwg9gJEfm3c3HUjzG5A9mHUbdJO2O7mxuhrmVP17dRPRggLgETcnscA6t9CPtt+9G2NUqT7VvJe7Q4aDtbzhH8MhqcIi+3KAjpgiSqPZbPxeW5Q52+g9hi1rYcmZ6qQGgglmfAC7ekodMLaasv9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777969382; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=NfJ1YduhltV+uaN4L6tWu1N+7FQbIUL59Zqc4X2ZkGQ=; b=ZEdrFzK0ba9ta9rNi7rfYtjEAOULSSQFwSBYhVyr6nbKVHjbhOFeeSey6LpVsQ+wOGWXWEcl+7btYhHuLEz8PFoq7laKO3wNJJ7Hj1eYOn9SKJgk5gaH+oGNP6FEAF48Xf02PEXcZbPYL+UZzNTPxQpp5CGQz9oAbiqba1W8xlw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1777969382118235.75511093647208; Tue, 5 May 2026 01:23:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1300312.1574833 (Exim 4.92) (envelope-from ) id 1wKB34-00087F-0Q; Tue, 05 May 2026 08:22:34 +0000 Received: by outflank-mailman (output) from mailman id 1300312.1574833; Tue, 05 May 2026 08:22:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wKB33-000878-Sg; Tue, 05 May 2026 08:22:33 +0000 Received: by outflank-mailman (input) for mailman id 1300312; Tue, 05 May 2026 08:22:32 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wKB32-000872-2P for xen-devel@lists.xenproject.org; Tue, 05 May 2026 08:22:32 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wKB31-00Bd9G-9s for xen-devel@lists.xenproject.org; Tue, 05 May 2026 10:22:31 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69f9a8c1-2eae-0a2a0a5409dd-0a2a4508a534-16 for ; Tue, 05 May 2026 10:22:31 +0200 Received: from [193.142.43.55] (helo=galois.linutronix.de) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 69f9a8c6-63b5-0a2a45080019-c18e2b379026-3 for ; Tue, 05 May 2026 10:22:30 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=2020 header.d=linutronix.de header.i="@linutronix.de" header.h="From:Sender:Reply-to:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References"; dkim=permerror header.s=2020e header.d=linutronix.de header.i="@linutronix.de" Date: Tue, 05 May 2026 08:22:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777969350; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NfJ1YduhltV+uaN4L6tWu1N+7FQbIUL59Zqc4X2ZkGQ=; b=BLC5MlbLbTtsTdDUzIrgvGle47013JfO2P/gEVbfxVRGNqTkmkoWfpuFBPyo8A2zvRwx3V pemz6g+A+NPc5JyB1R8Bjwqi6yzFBzlJHw84q5SxCgDxKOjZIfJSQbcIQct+T6VyvElDww HHlPE6rIYYWt8VzlQNE8unryG5ndPjS0HOivgYPoJq/fK4UdIsAcNPJ5NdQvx8l74M2Lxv KOWINWXnEYKVQSJtb7ytgRyZdIK+mB2t6SfsOanNI0UErzijCu1/1s/+DH2EOPJ25AnbS4 AfRCnZXsR0Myknv/jI3vs5u5CG1I8o5KF8I63OcWtFnbiX48GuTdaCpmNu9vlA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777969350; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NfJ1YduhltV+uaN4L6tWu1N+7FQbIUL59Zqc4X2ZkGQ=; b=S/w43rLBt5Tlyfy2AJR2F2D4w9Nnj9xNeQTvWXi6LzsE3IlB0iWK0QJRapaesXJcLpCvzi HeHF3ogJfKcy7ZBA== From: "tip-bot2 for Juergen Gross" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/xen: Fix a potential problem in xen_e820_resolve_conflicts() Cc: Juergen Gross , Ingo Molnar , xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260505080653.197775-1-jgross@suse.com> References: <20260505080653.197775-1-jgross@suse.com> MIME-Version: 1.0 Message-ID: <177796934897.424702.11107616066849971102.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-c1860d/1777969351-C2975DB1-57E2DF78/0/0 X-purgate-type: clean X-purgate-size: 1961 X-ZohoMail-DKIM: pass (identity @linutronix.de) X-ZM-MESSAGEID: 1777969383154158500 The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 5f8719945244dd65b5fa06195f4600db62581610 Gitweb: https://git.kernel.org/tip/5f8719945244dd65b5fa06195f4600db6= 2581610 Author: Juergen Gross AuthorDate: Tue, 05 May 2026 10:06:53 +02:00 Committer: Ingo Molnar CommitterDate: Tue, 05 May 2026 10:17:00 +02:00 x86/xen: Fix a potential problem in xen_e820_resolve_conflicts() When fixing a conflict in xen_e820_resolve_conflicts(), the loop over the E820 map entries needs to be restarted, as the E820 map will have been modified by the fix. Otherwise entries might be skipped by accident. Fixes: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen al= located memory") Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Cc: xen-devel@lists.xenproject.org Link: https://patch.msgid.link/20260505080653.197775-1-jgross@suse.com --- arch/x86/xen/setup.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index ac8021c..bb95a05 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -695,17 +695,22 @@ static void __init xen_e820_resolve_conflicts(phys_ad= dr_t start, return; =20 end =3D start + size; - entry =3D xen_e820_table.entries; + mapcnt =3D 0; =20 - for (mapcnt =3D 0; mapcnt < xen_e820_table.nr_entries; mapcnt++) { + while (mapcnt < xen_e820_table.nr_entries) { + entry =3D xen_e820_table.entries + mapcnt; if (entry->addr >=3D end) return; =20 if (entry->addr + entry->size > start && - entry->type =3D=3D E820_TYPE_NVS) + entry->type =3D=3D E820_TYPE_NVS) { xen_e820_swap_entry_with_ram(entry); + /* E820 map has been changed, restart loop! */ + mapcnt =3D 0; + continue; + } =20 - entry++; + mapcnt++; } } =20