lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250224151225.3637934-1-arnd@kernel.org>
Date: Mon, 24 Feb 2025 16:12:21 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>,
	Kees Cook <kees@...nel.org>,
	Brian Mak <makb@...iper.net>
Cc: Arnd Bergmann <arnd@...db.de>,
	David Hildenbrand <david@...hat.com>,
	Peter Xu <peterx@...hat.com>,
	Jason Gunthorpe <jgg@...pe.ca>,
	John Hubbard <jhubbard@...dia.com>,
	Steve Sistare <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-kernel@...r.kernel.org
Subject: [PATCH] mm: unhide get_dump_page() function

From: Arnd Bergmann <arnd@...db.de>

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

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.

Fixes: ff41385709f0 ("coredump: Only sort VMAs when truncating or core_sort_vma sysctl is set")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 mm/gup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/gup.c b/mm/gup.c
index d846c0ce41d6..15d6d7b5df1d 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2266,7 +2266,7 @@ EXPORT_SYMBOL(fault_in_readable);
  *
  * Called without mmap_lock (takes and releases the mmap_lock by itself).
  */
-#ifdef CONFIG_ELF_CORE
+#ifdef CONFIG_COREDUMP
 struct page *get_dump_page(unsigned long addr, int *locked)
 {
 	struct page *page;
@@ -2276,7 +2276,7 @@ struct page *get_dump_page(unsigned long addr, int *locked)
 				      FOLL_FORCE | FOLL_DUMP | FOLL_GET);
 	return (ret == 1) ? page : NULL;
 }
-#endif /* CONFIG_ELF_CORE */
+#endif /* CONFIG_COREDUMP */
 
 #ifdef CONFIG_MIGRATION
 
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ