From nobody Tue Dec 2 02:30:43 2025 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C5D8369209 for ; Wed, 19 Nov 2025 15:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763567143; cv=none; b=b5EupDWVoBMN9+o9P2fA+Q5pxr+bpmT0dKbCeXBGc17YhHvYgVrprnGar8oB9+Ew7kUqXhObiDwqG+IiUDFS3dNFRb514n5IZl+az7PG7Dwk4d9KwJL1CSg7JR9tp49DBHjFH/srRQK/RDSDZ9YLRyWIJmnjiDA12+URB1klTHo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763567143; c=relaxed/simple; bh=+VK7KRl6+Lq6c3QG0QoLNUfpAYwW2X9fA09G/NfS6uk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bW88JQnV0c1NStZyGTX4hprTHeEpRJYkenmmUk5pOj88vjuaGCW1k80jyC10ksh67Lm3u9Aji8HqnlCssWKMcjSL08qpQg6qVutaaQsXXMaVNgH2kDhRmMTxbCSmYx6N8wlmsaui0fxBYCrS0WT+0TO6iqniYrH012oPcEjEudU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=j6sLEfh9; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j6sLEfh9" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-429c48e05aeso712912f8f.1 for ; Wed, 19 Nov 2025 07:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763567134; x=1764171934; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AuFAdi/dQ7TYcP6kPKC/D+o7MTxWjWW8Ku2RD10GvbQ=; b=j6sLEfh9uv7+dsvFnDqDQa6anzRkocsy8dt+OoGqRNipZTLpbhM0kN8gp+hG0HbaBs MMBo7xYfGVPH43vHvKGRCgch64x3w+5gOHyhKTn6HQ+sYqIorf4m52B2SrG4bBRx89Ci k7s7HPQsG+hLYQe0dBWwwYUE3j83EEMt+amQKWLX6AugMw0fo3ZbbVB5M+piJ6Meo17+ DvU/V8qk2/79vb7SU4ODsNiDcw+a5f4qtSc80/uGNdJXinhamtY1cOT2Gtifllx8JCIq 7cY4R9Y0192OrEL58Af8mu4tpPfVY0/Be+sl7rGwPj7IfS35Td5zUv2USdiF44V8DV8K PVjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763567134; x=1764171934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AuFAdi/dQ7TYcP6kPKC/D+o7MTxWjWW8Ku2RD10GvbQ=; b=ItBcUGWp5gnh6jMGqn/U2QO8sLNxQrgloAZqsONSzsKU/yeKDRpv+BVDuK50exNcbZ +rysJO2oc3ixK14qfios1aHRG0TWsdDijLcOH8Pg0ifRzpNKolN/Bf6bxUKd3Kj5+SoD bWSZ448YmmQhHslDVgYnug7cjcPp5XJO0zpwE9rwBmQ9CdR7zV3ZLo/oH9/1JTVXPpzJ 0i32EpsS9NGrDi4KKmbdnc4DAKKp+by/CRDY8ERPtZYbPPvb1vmMjwSyxEq+fCG6Kipk 21SrvYPD6x55MN99QVYlCv3mudbK1QoDc/83ANZQ7ELDqeYPlO3pS6YDhoju4lAL4CZN 7/4Q== X-Forwarded-Encrypted: i=1; AJvYcCUMuNsJULLvRllbjRsZETlu8DOfToOQnx83MHDyY1VUOOFuyrKGAGvMfrey7chUBfSDnIilcWBtP/kbzGk=@vger.kernel.org X-Gm-Message-State: AOJu0YwZZzpo9G1yhnQRYXcn0POyF24yi+Wyb0NwyEz1IdaSeQKAgBlV h152o/zHc5zcWo00NINy0hCqiTIt93qNX/1l/EjVdkf0ZyqJoPrSmHIURbmNYtbI5jB2Tgo2RFd FSMR+ASL/FQ== X-Gm-Gg: ASbGncu/yYIJVReZovssbPhNYumrmJyP0dIQHUYHdZPP8P0T+ioRd4s0V5BrfPQTBCv vMJ9KcTNSQ1E26C6MfY/lJYI3TPriy8Wsy8RSP/SvshEuUg9j1B+tQZkNWk3jzjDw65xmcCypzS xHMELy9jPjhO0g56zY0GgqgJ1eeRwe3789fYS3VTpdHhM5N0iWcFw1F0AzBPBy3jfImWJcTLuqa ++GmOckEDjX5cAGlGKHKZ3XUh+koh9q/Wiu/j2loDigC5gd3xfJYGLbEdwleLtxhaNeVLwhZ02V dAKAqQHNP3QNCOfAB0FMhHFmFGJgMvL9FpnoH5XWnIIOxITYoZhGm6t1CZcRPSFbufi2ltp6DU+ bXs19wYBXte1OSLTSxDvpsjWBZj5ISsFal3mBw9J/Nok++FafGSIDohW/jXiiuSHff57YdTcnIF Zcf7WyThPhrUHS0UjlyYoHklihFvuzuA== X-Google-Smtp-Source: AGHT+IEEW1UNe8+i9pRkQXcVi1K6qHmkkggtbzPn6ocK+c8Bp9XYSPJPKkUMg9h5XQagLem1rvsEdA== X-Received: by 2002:a05:6000:26d0:b0:429:eb80:11f5 with SMTP id ffacd0b85a97d-42cb20e4a02mr3468125f8f.26.1763567134112; Wed, 19 Nov 2025 07:45:34 -0800 (PST) Received: from eugen-station.. ([82.76.24.202]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42b53dea1c9sm38765632f8f.0.2025.11.19.07.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 07:45:33 -0800 (PST) From: Eugen Hristev To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, tglx@linutronix.de, andersson@kernel.org, pmladek@suse.com, rdunlap@infradead.org, corbet@lwn.net, david@redhat.com, mhocko@suse.com Cc: tudor.ambarus@linaro.org, mukesh.ojha@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, linux-hardening@vger.kernel.org, jonechou@google.com, rostedt@goodmis.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-arch@vger.kernel.org, tony.luck@intel.com, kees@kernel.org, Eugen Hristev Subject: [PATCH 10/26] mm/swapfile: Annotate static information into meminspect Date: Wed, 19 Nov 2025 17:44:11 +0200 Message-ID: <20251119154427.1033475-11-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251119154427.1033475-1-eugen.hristev@linaro.org> References: <20251119154427.1033475-1-eugen.hristev@linaro.org> 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 Content-Type: text/plain; charset="utf-8" Annotate vital static information into inspection table: - nr_swapfiles Information on these variables is stored into dedicated inspection section. Signed-off-by: Eugen Hristev --- mm/swapfile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/swapfile.c b/mm/swapfile.c index 10760240a3a2..ee677be19041 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -42,6 +42,7 @@ #include #include #include +#include =20 #include #include @@ -65,6 +66,7 @@ static void move_cluster(struct swap_info_struct *si, =20 static DEFINE_SPINLOCK(swap_lock); static unsigned int nr_swapfiles; +MEMINSPECT_SIMPLE_ENTRY(nr_swapfiles); atomic_long_t nr_swap_pages; /* * Some modules use swappable objects and may try to swap them out under --=20 2.43.0