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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h6vd4nm5.fsf@redhat.com>
Date:   Wed, 22 Feb 2023 18:27:14 +0100
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org
Cc:     Vineeth Pillai <viremana@...ux.microsoft.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>, kvm@...r.kernel.org
Subject: Re: [PATCH v2] KVM: SVM: hyper-v: placate modpost section mismatch
 error

Randy Dunlap <rdunlap@...radead.org> writes:

> modpost reports section mismatch errors/warnings:
> WARNING: modpost: vmlinux.o: section mismatch in reference: svm_hv_hardware_setup (section: .text) -> (unknown) (section: .init.data)
> WARNING: modpost: vmlinux.o: section mismatch in reference: svm_hv_hardware_setup (section: .text) -> (unknown) (section: .init.data)
> WARNING: modpost: vmlinux.o: section mismatch in reference: svm_hv_hardware_setup (section: .text) -> (unknown) (section: .init.data)
>
> Marking svm_hv_hardware_setup() as __init fixes the warnings.
>
> I don't know why this should be needed -- it seems like a compiler
> problem to me since the calling function is marked as __init.
>
> This "(unknown) (section: .init.data)" all refer to svm_x86_ops.
>
> Fixes: 1e0c7d40758b ("KVM: SVM: hyper-v: Remote TLB flush for SVM")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Vineeth Pillai <viremana@...ux.microsoft.com>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Vitaly Kuznetsov <vkuznets@...hat.com>
> Cc: Sean Christopherson <seanjc@...gle.com>
> Cc: kvm@...r.kernel.org
> ---
> v2: also make the empty stub function be __init (Vitaly)

Thanks!

Reviewed-by: Vitaly Kuznetsov <vkuznets@...hat.com>

>
>  arch/x86/kvm/svm/svm_onhyperv.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -- a/arch/x86/kvm/svm/svm_onhyperv.h b/arch/x86/kvm/svm/svm_onhyperv.h
> --- a/arch/x86/kvm/svm/svm_onhyperv.h
> +++ b/arch/x86/kvm/svm/svm_onhyperv.h
> @@ -30,7 +30,7 @@ static inline void svm_hv_init_vmcb(stru
>  		hve->hv_enlightenments_control.msr_bitmap = 1;
>  }
>  
> -static inline void svm_hv_hardware_setup(void)
> +static inline __init void svm_hv_hardware_setup(void)
>  {
>  	if (npt_enabled &&
>  	    ms_hyperv.nested_features & HV_X64_NESTED_ENLIGHTENED_TLB) {
> @@ -84,7 +84,7 @@ static inline void svm_hv_init_vmcb(stru
>  {
>  }
>  
> -static inline void svm_hv_hardware_setup(void)
> +static inline __init void svm_hv_hardware_setup(void)
>  {
>  }
>  
>

-- 
Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ