Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Stoakes <ljs@kernel.org>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	Eugen Hristev <ehristev@kernel.org>,
	 Arnd Bergmann <arnd@arndb.de>, Dennis Zhou <dennis@kernel.org>,
	Tejun Heo <tj@kernel.org>,  Christoph Lameter <cl@gentwo.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Thomas Gleixner <tglx@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	 Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	 John Stultz <jstultz@google.com>,
	Stephen Boyd <sboyd@kernel.org>, Kees Cook <kees@kernel.org>,
	 Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	 Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	 Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	 Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	 David Hildenbrand <david@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	 Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
	 Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	 Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	 Barry Song <baohua@kernel.org>,
	Youngjun Park <youngjun.park@lge.com>,
	 Petr Mladek <pmladek@suse.com>,
	John Ogness <john.ogness@linutronix.de>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	Bjorn Andersson <andersson@kernel.org>,
	 Mathieu Poirier <mathieu.poirier@linaro.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Saravana Kannan <saravanak@kernel.org>,
	 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
Date: Thu, 9 Jul 2026 15:53:44 +0100	[thread overview]
Message-ID: <ak-1HujOABoQ9wR_@lucifer> (raw)
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 <ehristev@kernel.org>
> > >
> > > 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 <eugen.hristev@linaro.org>
> > > Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> > > ---
> > >  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 <linux/suspend.h>
> > >  #include <linux/zswap.h>
> > >  #include <linux/plist.h>
> > > +#include <linux/meminspect.h>
> > >
> > >  #include <asm/tlbflush.h>
> > >  #include <linux/leafops.h>
> > > @@ -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


  reply	other threads:[~2026-07-09 14:54 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  5:31 [PATCH v3 00/26] Introduce meminspect Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 01/26] kernel: " Mukesh Ojha
2026-07-08  7:38   ` Lorenzo Stoakes
2026-07-08 13:33     ` Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 02/26] init/version: Annotate static information into meminspect Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 03/26] mm/percpu: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 04/26] cpu: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 05/26] genirq/irqdesc: " Mukesh Ojha
2026-07-08  7:46   ` Lorenzo Stoakes
2026-07-08  5:31 ` [PATCH v3 06/26] timers: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 07/26] timekeeping: Register tk_data " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 08/26] kernel/fork: Annotate static information " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 09/26] mm/page_alloc: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 10/26] mm/show_mem: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 11/26] mm/swapfile: " Mukesh Ojha
2026-07-08  7:47   ` Lorenzo Stoakes
2026-07-08 19:05     ` Mukesh Ojha
2026-07-09 14:53       ` Lorenzo Stoakes [this message]
2026-07-10  4:09         ` Christoph Hellwig
2026-07-08  5:31 ` [PATCH v3 12/26] kernel/vmcore_info: Register dynamic " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 13/26] kernel/configs: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 14/26] mm/init-mm: Annotate static " Mukesh Ojha
2026-07-08  7:52   ` Lorenzo Stoakes
2026-07-08  5:31 ` [PATCH v3 15/26] panic: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 16/26] kallsyms: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 17/26] mm/mm_init: " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 18/26] sched/core: Annotate runqueues " Mukesh Ojha
2026-07-08  5:31 ` [PATCH v3 19/26] mm/numa: Register node data information " Mukesh Ojha
2026-07-08  7:55   ` Lorenzo Stoakes
2026-07-08  5:31 ` [PATCH v3 20/26] mm/sparse: Register " Mukesh Ojha
2026-07-08  5:32 ` [PATCH v3 21/26] printk: " Mukesh Ojha
2026-07-08  7:59   ` Lorenzo Stoakes
2026-07-08 18:53     ` Mukesh Ojha
2026-07-09  8:16     ` Petr Mladek
2026-07-08  5:32 ` [PATCH v3 22/26] remoteproc: qcom: Move minidump data structures into its own header Mukesh Ojha
2026-07-08  5:32 ` [PATCH v3 23/26] soc: qcom: Add minidump backend driver Mukesh Ojha
2026-07-08  5:32 ` [PATCH v3 24/26] soc: qcom: smem: Add minidump platform device Mukesh Ojha
2026-07-08  5:32 ` [PATCH v3 25/26] dt-bindings: reserved-memory: Add Google Kinfo Pixel reserved memory Mukesh Ojha
2026-07-08  7:08 ` [PATCH v3 26/26] meminspect: Add debug kinfo compatible driver Mukesh Ojha
2026-07-08  8:06   ` Lorenzo Stoakes
2026-07-08 18:46     ` Mukesh Ojha
2026-07-09 13:24   ` Petr Pavlu
2026-07-08  7:11 ` [PATCH v3 00/26] Introduce meminspect Lorenzo Stoakes
2026-07-08  8:18   ` Lorenzo Stoakes
2026-07-09 20:42     ` Mukesh Ojha
2026-07-10  1:51 ` Liam R. Howlett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ak-1HujOABoQ9wR_@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andersson@kernel.org \
    --cc=anna-maria@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=bsegall@google.com \
    --cc=chrisl@kernel.org \
    --cc=cl@gentwo.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=david@kernel.org \
    --cc=dennis@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=ehristev@kernel.org \
    --cc=frederic@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=john.ogness@linutronix.de \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kasong@tencent.com \
    --cc=kees@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=kprateek.nayak@amd.com \
    --cc=krzk+dt@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=mukesh.ojha@oss.qualcomm.com \
    --cc=nphamcs@gmail.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    --cc=saravanak@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=shikemeng@huaweicloud.com \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=tglx@kernel.org \
    --cc=tj@kernel.org \
    --cc=vbabka@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=workflows@vger.kernel.org \
    --cc=youngjun.park@lge.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox