From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9911569B for ; Thu, 15 Dec 2022 18:13:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10D52C433EF; Thu, 15 Dec 2022 18:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1671127995; bh=GqlCljcXYcLyLProTWx1L+qLCPI4QH6WP7FAKEXkoJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0ejIjyaBvcmMXS7vP+2tdCrGHH677ZuB/euqfBbSPWMkZfdrVUN8tUWPbEfoGzOQU SwrU7wKH/YxN8HCJNPI8karTybaUtshyAlI+v21tt9ygLvcu5WoPkZvrs9LxIcb8wX W+NNKvCBmMdqkZbcy44tS7RWXuqYYv6MZ9Xw50o8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nathan Chancellor , Thomas Gleixner , Nick Desaulniers Subject: [PATCH 6.0 03/16] x86/vdso: Conditionally export __vdso_sgx_enter_enclave() Date: Thu, 15 Dec 2022 19:10:47 +0100 Message-Id: <20221215172908.306390891@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221215172908.162858817@linuxfoundation.org> References: <20221215172908.162858817@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Nathan Chancellor commit 45be2ad007a9c6bea70249c4cf3e4905afe4caeb upstream. 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. Fixes: 8466436952017 ("x86/vdso: Implement a vDSO for Intel SGX enclave call") Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Gleixner Reviewed-by: Nick Desaulniers Link: https://github.com/ClangBuiltLinux/linux/issues/1756 Link: https://lore.kernel.org/r/20221109000306.1407357-1-nathan@kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/x86/entry/vdso/vdso.lds.S | 2 ++ 1 file changed, 2 insertions(+) --- 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: *; }; }