From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 17ACE2D594F; Thu, 9 Jul 2026 14:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783608846; cv=none; b=Ye7VOvSgQStQQb+pEbRs7rDetx+jnPedMbhwmzr2LodnNW/UZlg0Ysrv/n8Yz00agCQ2khyhSPXkxTODH8TnFu5wThyndvQM1DiO4so52cvCUKD61koZDrrO0hswxMC+Muy83u9KAbcbfljmoXjP8sSPyAc3W+igs5QNUKsue9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783608846; c=relaxed/simple; bh=KsqiLd+WP/dEzp/JtdS1jz3UBoP38vUKUrL26WhPsAo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=un2erJjttmYaKYN5oFeGuApKcoTM/4BwHLmK7acop0OexvAdGdiMde6viErTfkpT3iGY5Zbylw5o5oGOrYPV0qvRq4HWvooqqD0vfx9nBMPXTeuRdpIGoZg9kyI9n6ZskOptIb6QlNvk93tItzawKZ8pKV9hF73sPiL+mekzx78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E4N+VKkF; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E4N+VKkF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2C441F000E9; Thu, 9 Jul 2026 14:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783608844; bh=u454d5mIhB0nOu1CqQBC0ybTPHcXpjed1DznN7MFSXs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=E4N+VKkFWWOS8bapsV8QXmtj6E1a5IrfEPvBLUpZDbV3x2oCUCv2sI3ZXTqzmOOoq p5Gnaz1AqvXrVp+DnTRXeqVHQuLv9w6hfPeLILoVV0TYOV+9fOTbkKRZF8papECTFy QxKzh4b1DYXzWcqj/9goODU1sXsYaHiHGox43v/ujz8IE2UB+sLm56ryHziFZKNSos JAq6u1/25pk6PvAxDpXFxLwnIJ3mOWHZSfFueyHLoWBjJhOZc539HlZfE4Ox2vrH2T lVVXs1dIygIi/6lnNTUq9jjv/12423Mv4WCXoAVQoZc2b50WK+jhDLrR6DY85v8yQs o15o3Gni1rTZg== Date: Thu, 9 Jul 2026 15:53:44 +0100 From: Lorenzo Stoakes To: Mukesh Ojha Cc: Jonathan Corbet , Shuah Khan , Eugen Hristev , Arnd Bergmann , Dennis Zhou , Tejun Heo , Christoph Lameter , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Anna-Maria Behnsen , Frederic Weisbecker , John Stultz , Stephen Boyd , Kees Cook , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , David Hildenbrand , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Youngjun Park , Petr Mladek , John Ogness , Sergey Senozhatsky , Bjorn Andersson , Mathieu Poirier , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan , workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 11/26] mm/swapfile: Annotate static information into meminspect Message-ID: References: <20260708-meminspect-v3-v3-0-7aa5a0a74d5c@oss.qualcomm.com> <20260708-meminspect-v3-v3-11-7aa5a0a74d5c@oss.qualcomm.com> <20260708190535.fhqaddicljho44eq@hu-mojha-hyd.qualcomm.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260708190535.fhqaddicljho44eq@hu-mojha-hyd.qualcomm.com> On Thu, Jul 09, 2026 at 12:35:35AM +0530, Mukesh Ojha wrote: > On Wed, Jul 08, 2026 at 08:47:51AM +0100, Lorenzo Stoakes wrote: > > On Wed, Jul 08, 2026 at 11:01:50AM +0530, Mukesh Ojha wrote: > > > From: Eugen Hristev > > > > > > Annotate vital static information into inspection table: > > > - nr_swapfiles > > > > > > Information on these variables is stored in a dedicated meminspect > > > section. > > > > > > Signed-off-by: Eugen Hristev > > > Signed-off-by: Mukesh Ojha > > > --- > > > mm/swapfile.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/mm/swapfile.c b/mm/swapfile.c > > > index a602e5820513..d480727e4987 100644 > > > --- a/mm/swapfile.c > > > +++ b/mm/swapfile.c > > > @@ -42,6 +42,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #include > > > #include > > > @@ -65,6 +66,7 @@ static void move_cluster(struct swap_info_struct *si, > > > */ > > > static DEFINE_SPINLOCK(swap_lock); > > > static unsigned int nr_swapfiles; > > > +MEMINSPECT_SIMPLE_ENTRY(nr_swapfiles); > > > > Now the EXPORT_SYMBOL_GPL() is an EXPORT_SYMBOL() in effect no? > > The whole reason we had to tag most of the MM symbols is that > the crash tool looks for this information while launching itself. You're missing the point. EXPORT_SYMBOL_GPL() != EXPORT_SYMBOL(). We cannot and will not allow symbols that are GPL-only to be exported by the back door to non-GPL modules. Meminspect seems to ignore all of this and just exports symbols another way overriding kernel mechanisms which is just not acceptable... I also don't really understand what you're saying here either, what has what crash looks up on startup got to do with anything? > > e.g., > > ./crash --no_modules --no_panic --no_kmem_cache --zero_excluded ./vmlinux ./minidump.elf > > > > > > > atomic_long_t nr_swap_pages; > > > /* > > > * Some modules use swappable objects and may try to swap them out under > > > > > > -- > > > 2.53.0 > > > > > -- > -Mukesh Ojha