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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220610114659.1506718-1-gongruiqi1@huawei.com>
Date:   Fri, 10 Jun 2022 19:46:59 +0800
From:   "GONG, Ruiqi" <gongruiqi1@...wei.com>
To:     Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Liao Chang <liaochang1@...wei.com>,
        Li Zhengyu <lizhengyu3@...wei.com>
CC:     <linux-riscv@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        "Wang Weiyang" <wangweiyang2@...wei.com>,
        Gong Ruiqi <gongruiqi1@...wei.com>
Subject: [PATCH] RISC-V: Fix a linkage error related to CONFIG_KEXEC{,_FILE}

Following files (currently compiled with CONFIG_KEXEC=y) are needed to
be linked with kernel/kexec_core.o (compiled with CONFIG_KEXEC_CORE=y):

  arch/riscv/kernel/kexec_relocate.o,
  arch/riscv/kernel/crash_save_regs.o,
  arch/riscv/kernel/machine_kexec.o

But CONFIG_KEXEC_CORE can also be selected by CONFIG_KEXEC_FILE
regardless of CONFIG_KEXEC, which causes the problem as the Link
specifies.

Fix this problem by changing the controling config of the above
arch/riscv/kernel/*.o to be CONFIG_KEXEC_CORE, as how some other
architectures do.

Link: https://lore.kernel.org/all/202206100324.B0KDSd1C-lkp@intel.com/
Reported-by: kernel test robot <lkp@...el.com>
Fixes: 6261586e0c91 ("RISC-V: Add kexec_file support")
Signed-off-by: GONG, Ruiqi <gongruiqi1@...wei.com>
---
 arch/riscv/kernel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index c71d6591d539..33bb60a354cd 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -78,7 +78,7 @@ obj-$(CONFIG_SMP) += cpu_ops_sbi.o
 endif
 obj-$(CONFIG_HOTPLUG_CPU)	+= cpu-hotplug.o
 obj-$(CONFIG_KGDB)		+= kgdb.o
-obj-$(CONFIG_KEXEC)		+= kexec_relocate.o crash_save_regs.o machine_kexec.o
+obj-$(CONFIG_KEXEC_CORE)	+= kexec_relocate.o crash_save_regs.o machine_kexec.o
 obj-$(CONFIG_KEXEC_FILE)	+= elf_kexec.o machine_kexec_file.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ