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-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H4X_cBNykL8Q2X_RbGBpUdTcNWDwDYejRXe_yYT8A_4yw@mail.gmail.com>
Date: Mon, 26 Aug 2024 22:22:09 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Arnd Bergmann <arnd@...db.de>, loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] LoongArch: Add ifdefs to fix LSX and LASX related issues

Applied, thanks.

Huacai

On Tue, Aug 20, 2024 at 8:37 PM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
>
> There exist some issues when building kernel if CONFIG_CPU_HAS_LBT is set
> but CONFIG_CPU_HAS_LSX and CONFIG_CPU_HAS_LASX are not set. In this case,
> there are no definitions of _restore_lsx and _restore_lasx and there are
> also no definitions of kvm_restore_lsx and kvm_restore_lasx in fpu.S and
> switch.S respectively, just add some ifdefs to fix the issues.
>
>   AS      arch/loongarch/kernel/fpu.o
> arch/loongarch/kernel/fpu.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0
> arch/loongarch/kernel/fpu.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0
>
>   AS [M]  arch/loongarch/kvm/switch.o
> arch/loongarch/kvm/switch.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0
> arch/loongarch/kvm/switch.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0
>
>   MODPOST Module.symvers
> ERROR: modpost: "kvm_restore_lsx" [arch/loongarch/kvm/kvm.ko] undefined!
> ERROR: modpost: "kvm_restore_lasx" [arch/loongarch/kvm/kvm.ko] undefined!
>
> Cc: stable@...r.kernel.org # 6.9+
> Fixes: cb8a2ef0848c ("LoongArch: Add ORC stack unwinder support")
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202408120955.qls5oNQY-lkp@intel.com/
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> ---
>  arch/loongarch/kernel/fpu.S | 4 ++++
>  arch/loongarch/kvm/switch.S | 4 ++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/arch/loongarch/kernel/fpu.S b/arch/loongarch/kernel/fpu.S
> index 69a85f2479fb..6ab640101457 100644
> --- a/arch/loongarch/kernel/fpu.S
> +++ b/arch/loongarch/kernel/fpu.S
> @@ -530,6 +530,10 @@ SYM_FUNC_END(_restore_lasx_context)
>
>  #ifdef CONFIG_CPU_HAS_LBT
>  STACK_FRAME_NON_STANDARD _restore_fp
> +#ifdef CONFIG_CPU_HAS_LSX
>  STACK_FRAME_NON_STANDARD _restore_lsx
> +#endif
> +#ifdef CONFIG_CPU_HAS_LASX
>  STACK_FRAME_NON_STANDARD _restore_lasx
>  #endif
> +#endif
> diff --git a/arch/loongarch/kvm/switch.S b/arch/loongarch/kvm/switch.S
> index 80e988985a6a..0c292f818492 100644
> --- a/arch/loongarch/kvm/switch.S
> +++ b/arch/loongarch/kvm/switch.S
> @@ -277,6 +277,10 @@ SYM_DATA(kvm_enter_guest_size, .quad kvm_enter_guest_end - kvm_enter_guest)
>
>  #ifdef CONFIG_CPU_HAS_LBT
>  STACK_FRAME_NON_STANDARD kvm_restore_fpu
> +#ifdef CONFIG_CPU_HAS_LSX
>  STACK_FRAME_NON_STANDARD kvm_restore_lsx
> +#endif
> +#ifdef CONFIG_CPU_HAS_LASX
>  STACK_FRAME_NON_STANDARD kvm_restore_lasx
>  #endif
> +#endif
> --
> 2.42.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ