Re: sev_es_trampoline_start undefined symbol referenced errors during kunit run
From: David Gow
Date: Tue Apr 15 2025 - 04:55:13 EST
On Tue, 15 Apr 2025 at 07:01, Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Mon, Apr 14, 2025 at 04:28:44PM -0600, Shuah Khan wrote:
... snip ...
>
> The real problem looks like that pasyms.h thing which gets included at the end
> of realmode.lds and which contains that symbol.
I had a look at this a few months ago, and came to the same
conclusion: that realmode.lds is where the issue is coming from. My
suspicion was that realmode.lds was being generated when the kernel
was built in-tree (with CONFIG_AMD_MEM_ENCRYPT), but somehow was not
being deleted when the source tree was being cleaned before an
out-of-tree build was being done (without CONFIG_AMD_MEM_ENCRYPT).
But, alas, I was never able to find a way to reproduce this to test it
out: realmode.lds seems to be properly deleted by make clean / make
mrproper here.
(My personal strategy is to always do out-of-tree builds, which may be
why I don't tend to randomly come across this. Equally, it may be
worth trying `--build_dir .` as an argument to kunit.py to force an
in-tree build if you're already doing in-tree builds often.)
Cheers,
-- David
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature