linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Brian Mak" <makb@juniper.net>, "Arnd Bergmann" <arnd@kernel.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"Kees Cook" <kees@kernel.org>,
	"David Hildenbrand" <david@redhat.com>,
	peterx <peterx@redhat.com>, "Jason Gunthorpe" <jgg@ziepe.ca>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"steven.sistare@oracle.com" <steven.sistare@oracle.com>,
	"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
	"Yang Shi" <yang@os.amperecomputing.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: unhide get_dump_page() function
Date: Mon, 24 Feb 2025 20:06:29 +0100	[thread overview]
Message-ID: <95b00b45-c9c3-4a2b-ae9f-a0144ac3d05e@app.fastmail.com> (raw)
In-Reply-To: <6EA7241F-A4B0-400C-B338-C375512727B5@juniper.net>

On Mon, Feb 24, 2025, at 19:42, Brian Mak wrote:
> On Feb 24, 2025, at 7:12 AM, Arnd Bergmann <arnd@kernel.org> wrote:
>
>> The definition of get_dump_page() is guarded by CONFIG_ELF_CORE, but
>> the caller has now moved into a function that is built based on
>> CONFIG_COREDUMP, which leads to a possible link failure:
>> 
>> ld.lld-21: error: undefined symbol: get_dump_page
>>>>> referenced by coredump.c
>>>>>              fs/coredump.o:(dump_vma_snapshot) in archive vmlinux.a
>
> Kernel test robot reported this issue yesterday here:
> https://lore.kernel.org/oe-kbuild-all/202502231914.ROOVWMZN-lkp@intel.com/
> https://lore.kernel.org/oe-kbuild-all/202502231818.fP8cuxmf-lkp@intel.com/
>
>> Change the #ifdef block around the definition to match the caller.
>> In practice there is very little difference, as setting COREDUMP
>> but not ELF_CORE is not useful.
>
> Good catch! I wonder if we should guard the sparse dump size calculation
> logic from the get_dump_page() caller behind CONFIG_ELF_CORE instead
> though. I guess the question becomes, will we ever have a non-ELF core
> dump format that won't skip zero pages?
>
> Anyway, I'm fine with this fix as-is.

The only other code that is guarded by CONFIG_COREDUMP now
is the powerpc spufs, but that is only used with ELF_CORE as
well.

The last non-ELF coredump support was removed in 2022, earlier
versions had some form of coredump for flat, a.out and som
binaries.

We can probably just combine ELF_CORE and COREDUMP into a
single Kconfig symbol.

      Arnd


      reply	other threads:[~2025-02-24 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 15:12 Arnd Bergmann
2025-02-24 18:40 ` Kees Cook
2025-02-24 18:42 ` Brian Mak
2025-02-24 19:06   ` Arnd Bergmann [this message]

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=95b00b45-c9c3-4a2b-ae9f-a0144ac3d05e@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=david@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=makb@juniper.net \
    --cc=peterx@redhat.com \
    --cc=steven.sistare@oracle.com \
    --cc=vivek.kasireddy@intel.com \
    --cc=yang@os.amperecomputing.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