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]
Date:   Wed, 31 Aug 2022 13:40:17 +0800
From:   Yupeng Li <liyupeng@...los.com>
To:     chenhuacai@...nel.org, kernel@...0n.name, jiaxun.yang@...goat.com
Cc:     loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
        caizp2008@....com, Yupeng Li <liyupeng@...los.com>
Subject: [PATCH 1/1] LoongArch: Fixed arch_remove_memory undefined build error.

The kernel build error when unslected CONFIG_MEMORY_HOTREMOVE, the
arch_remove_memory in mm/memory_hotplug.c was undefined.
Removed CONFIG_MEMORY_HOTREMOVE requirement refer to the definitions
of other platform architectures.Some build error messages like:

 LD      vmlinux.o
 MODPOST vmlinux.symvers
 MODINFO modules.builtin.modinfo
 GEN     modules.builtin
 LD      .tmp_vmlinux.kallsyms1
loongarch64-linux-gnu-ld: mm/memory_hotplug.o: in function `.L242':
memory_hotplug.c:(.ref.text+0x930): undefined reference to `arch_remove_memory'
make: *** [Makefile:1169:vmlinux] 错误 1

Signed-off-by: Yupeng Li <liyupeng@...los.com>
Signed-off-by: Caicai <caizp2008@....com>
---
 arch/loongarch/mm/init.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index 7094a68c9b83..191ed8e47895 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -142,7 +142,6 @@ int memory_add_physaddr_to_nid(u64 start)
 EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
 #endif
 
-#ifdef CONFIG_MEMORY_HOTREMOVE
 void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
 {
 	unsigned long start_pfn = start >> PAGE_SHIFT;
@@ -155,7 +154,6 @@ void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
 	__remove_pages(start_pfn, nr_pages, altmap);
 }
 #endif
-#endif
 
 /*
  * Align swapper_pg_dir in to 64K, allows its address to be loaded
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ