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]
Date:   Thu, 10 Nov 2022 12:46:16 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        patches@...ts.linux.dev, Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH] x86/vdso: Conditionally export __vdso_sgx_enter_enclave

On Tue, Nov 8, 2022 at 4:04 PM Nathan Chancellor <nathan@...nel.org> wrote:
>
> Recently, ld.lld moved from '--undefined-version' to
> '--no-undefined-version' as the default, which breaks building the vDSO
> when CONFIG_X86_SGX is not set:
>
>   ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined
>
> __vdso_sgx_enter_enclave is only included in the vDSO when
> CONFIG_X86_SGX is set. Only export it if it will be present in the final
> object, which clears up the error.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1756
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
>
> It would be nice if this could be picked up for an -rc release but I
> won't argue otherwise.

Sounds like the lld change got reverted, so this is less urgent now,
but the change still LGTM regardless. Thanks for the patch!

Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
Fixes: 8466436952017 ("x86/vdso: Implement a vDSO for Intel SGX enclave call")


>
> Alternatively, we could add '--undefined-version' to the vDSO ldflags
> but this does not seem unreasonable to me.
>
>  arch/x86/entry/vdso/vdso.lds.S | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/entry/vdso/vdso.lds.S b/arch/x86/entry/vdso/vdso.lds.S
> index 4bf48462fca7..e8c60ae7a7c8 100644
> --- a/arch/x86/entry/vdso/vdso.lds.S
> +++ b/arch/x86/entry/vdso/vdso.lds.S
> @@ -27,7 +27,9 @@ VERSION {
>                 __vdso_time;
>                 clock_getres;
>                 __vdso_clock_getres;
> +#ifdef CONFIG_X86_SGX
>                 __vdso_sgx_enter_enclave;
> +#endif
>         local: *;
>         };
>  }
>
> base-commit: f0c4d9fc9cc9462659728d168387191387e903cc
> --
> 2.38.1
>
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ