[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <95b00b45-c9c3-4a2b-ae9f-a0144ac3d05e@app.fastmail.com>
Date: Mon, 24 Feb 2025 20:06:29 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Brian Mak" <makb@...iper.net>, "Arnd Bergmann" <arnd@...nel.org>
Cc: "Andrew Morton" <akpm@...ux-foundation.org>,
"Kees Cook" <kees@...nel.org>, "David Hildenbrand" <david@...hat.com>,
peterx <peterx@...hat.com>, "Jason Gunthorpe" <jgg@...pe.ca>,
"John Hubbard" <jhubbard@...dia.com>,
"steven.sistare@...cle.com" <steven.sistare@...cle.com>,
"Vivek Kasireddy" <vivek.kasireddy@...el.com>,
"Yang Shi" <yang@...amperecomputing.com>,
"Christophe Leroy" <christophe.leroy@...roup.eu>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: unhide get_dump_page() function
On Mon, Feb 24, 2025, at 19:42, Brian Mak wrote:
> On Feb 24, 2025, at 7:12 AM, Arnd Bergmann <arnd@...nel.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
Powered by blists - more mailing lists