From nobody Mon Feb 9 08:55:35 2026 Received: from mta20.hihonor.com (mta20.honor.com [81.70.206.69]) (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 3BF7E125B2 for ; Thu, 18 Dec 2025 01:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=81.70.206.69 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766023152; cv=none; b=ptdDAFji9nW1OGyniZU5IAZcD688veoZXQ72Mek/JzHyokD31gDCVhf8SdijFi2ao5T6uZ2OjWwllFjDdJJQHzfhGqP+rB0zJUt56VpczPsMW169MqM5JnLkmmAGnZNpk3hOJFKCxwkR0HquptrJ0uuSJS+YtJoJoRAPwtsnVAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766023152; c=relaxed/simple; bh=A+Zuspe5VJtHd35LdgeCVdakZgmxI+9ysdFKHFGzjNQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hS1Tt4uhtF7joYZKb4gWLGFJPtDfiZNxfkAULZgxubrB5u0EKDI+Q8bBKjQCqGrEF2/azqnDtteEYmHmGkoAfykkgWXD6xthC+8AUn9m9yP4aVEnj7OpWp+363/kDbm5jp5si+orUWdHTVJU/+LZCR71fK4bW0t4TgF3YOrfPyc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com; spf=pass smtp.mailfrom=honor.com; arc=none smtp.client-ip=81.70.206.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=honor.com Received: from w002.hihonor.com (unknown [10.68.28.120]) by mta20.hihonor.com (SkyGuard) with ESMTPS id 4dWv0X2l0vzYqZWX; Thu, 18 Dec 2025 09:56:28 +0800 (CST) Received: from w025.hihonor.com (10.68.28.69) by w002.hihonor.com (10.68.28.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Thu, 18 Dec 2025 09:59:02 +0800 Received: from localhost.localdomain (10.144.17.252) by w025.hihonor.com (10.68.28.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Thu, 18 Dec 2025 09:59:01 +0800 From: yuan linyu To: Alexander Potapenko , Marco Elver , Dmitry Vyukov , Andrew Morton , Huacai Chen , WANG Xuerui , , , CC: , yuan linyu Subject: [PATCH 1/3] LoongArch: kfence: avoid use CONFIG_KFENCE_NUM_OBJECTS Date: Thu, 18 Dec 2025 09:58:47 +0800 Message-ID: <20251218015849.1414609-2-yuanlinyu@honor.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20251218015849.1414609-1-yuanlinyu@honor.com> References: <20251218015849.1414609-1-yuanlinyu@honor.com> 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-ClientProxiedBy: w012.hihonor.com (10.68.27.189) To w025.hihonor.com (10.68.28.69) Content-Type: text/plain; charset="utf-8" use common kfence macro KFENCE_POOL_SIZE for KFENCE_AREA_SIZE definition Signed-off-by: yuan linyu --- arch/loongarch/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/= asm/pgtable.h index f41a648a3d9e..e9966c9f844f 100644 --- a/arch/loongarch/include/asm/pgtable.h +++ b/arch/loongarch/include/asm/pgtable.h @@ -10,6 +10,7 @@ #define _ASM_PGTABLE_H =20 #include +#include #include #include #include @@ -96,7 +97,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(u= nsigned long)]; #define MODULES_END (MODULES_VADDR + SZ_256M) =20 #ifdef CONFIG_KFENCE -#define KFENCE_AREA_SIZE (((CONFIG_KFENCE_NUM_OBJECTS + 1) * 2 + 2) * PAGE= _SIZE) +#define KFENCE_AREA_SIZE (KFENCE_POOL_SIZE + (2 * PAGE_SIZE)) #else #define KFENCE_AREA_SIZE 0 #endif --=20 2.25.1