From nobody Mon Jun 8 09:48:27 2026 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FEA03E9C33 for ; Thu, 4 Jun 2026 09:21:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780564918; cv=none; b=bSAr+GB4HiuPPwVaiGmDQsDg7/rT70eBXT2F491P53bvFe4wXR0S1fy2/11Ahe4x+DJ1SlzqVX1fUcfqs351uCpSt5xiz+5qo8UBQOaRHj4VhfwQWTPvxIM59H34bMlXjMHfdQyBvQXDW0sF8JjYaQboXKzV+/lAy4Qv+YYi3K8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780564918; c=relaxed/simple; bh=rcSokezPtOhcmxFsI5Wjm+Dyp0dcdRxlmM64NQ3fje0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=C/uxwhtHdEW4ozWS741Ia1x/Db576VMpjpzA4KpQ/gPGEMvK5FpBaKX+ADJFGo0etBnodval9Nv41kN+caPqwGARJ2WLJP1hHCOhZ2pp6GqNEdHy/ZI7FO75vkNaISSr8pEsA1d4O4lMxiqLugnwCN2APOBs6f3qeZ0PY44l114= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fY9klKKl; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fY9klKKl" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780564913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MpDsKqtekJF/ott3Wm9QFal8yf1kb3vz/4aJWlmRjiw=; b=fY9klKKlP4cXfhABmPRlqYQP+b6Iu9wu75MwA7pQElSgeZMor7qdyydSudzS3Kjz5MZkDy iPnHz85+14rrN+cZvmJi2kNolTohKYjYGyKWSM+sCV6IOktlJOTj6H+bZOVbNIGyJgE+JC 0+7Mi11pATjgp3/WiglhFnDG+hcyIQw= From: George Guo To: pasha.tatashin@soleen.com, rppt@kernel.org, pratyush@kernel.org Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, chenhuacai@kernel.org, loongarch@lists.linux.dev, George Guo , Kexin Liu Subject: [PATCH v2] liveupdate: luo_session: include linux/mm.h for virt/phys translation Date: Thu, 4 Jun 2026 17:19:13 +0800 Message-Id: <20260604091913.306603-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: George Guo luo_session.c calls virt_to_phys() and phys_to_virt(). On LoongArch with CONFIG_KFENCE=3Dy, these macros (in arch/loongarch/include/asm/io.h) expand to offset_in_page() and page_address(), both declared in . Since luo_session.c only includes , the translation unit fails to build with CONFIG_KFENCE=3Dy: asm/io.h: error: implicit declaration of function 'offset_in_page' asm/io.h: error: implicit declaration of function 'page_address' Add the missing include to fix these build errors. Co-developed-by: Kexin Liu Signed-off-by: Kexin Liu Signed-off-by: George Guo --- v2: Move the include from arch/loongarch/include/asm/io.h to the consumer luo_session.c, instead of pulling the heavy into the low-level asm/io.h header (per review feedback). The 0-day report confirmed the v1 approach introduces a circular include (slab.h -> kasan.h -> asm/kasan.h -> asm/io.h -> mm.h, where mm.h needs kfree() before slab.h declares it). Link: https://lore.kernel.org/r/20260521063310.52926-1-dongtai.guo@linux.de= v/ # v1 kernel/liveupdate/luo_session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_sessio= n.c index 7a42385dabe2..4ce7128a4ae9 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include --=20 2.25.1