Re: sev_es_trampoline_start undefined symbol referenced errors during kunit run

From: Shuah Khan
Date: Tue Apr 15 2025 - 10:25:22 EST


On 4/14/25 17:00, Borislav Petkov wrote:
On Mon, Apr 14, 2025 at 04:28:44PM -0600, Shuah Khan wrote:
Hi Tom,

I have been seeing sev_es_trampoline_start undefined symbol referenced errors
during the following kunit test runs.

./tools/testing/kunit/kunit.py run --arch x86_64
./tools/testing/kunit/kunit.py run --alltests --arch x86_64

The error is here:

ERROR:root:ld:arch/x86/realmode/rm/realmode.lds:236: undefined symbol `sev_es_trampoline_start' referenced in expression
make[6]: *** [../arch/x86/realmode/rm/Makefile:49: arch/x86/realmode/rm/realmode.elf] Error 1
make[5]: *** [../arch/x86/realmode/Makefile:22: arch/x86/realmode/rm/realmode.bin] Error 2
make[4]: *** [../scripts/Makefile.build:461: arch/x86/realmode] Error 2



The real problem looks like that pasyms.h thing which gets included at the end
of realmode.lds and which contains that symbol.

How exactly can this be reproduced? Exact steps please.

Run these kunit tests - not out of tree. Tree has to be
clean to run these tests. Otherwise you are prompted to
run mrproper.

./tools/testing/kunit/kunit.py run --arch x86_64
or
./tools/testing/kunit/kunit.py run --alltests --arch x86_64

The tree I see this every single time I do my tree testing.

thanks,
-- Shuah