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: <6775da23-c596-44e4-a7f3-64c602b2609b@linuxfoundation.org>
Date: Tue, 15 Apr 2025 19:09:06 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: David Gow <davidgow@...gle.com>
Cc: Borislav Petkov <bp@...en8.de>, thomas.lendacky@....com,
 "x86@...nel.org" <x86@...nel.org>,
 Brendan Higgins <brendan.higgins@...ux.dev>, linux-kernel@...r.kernel.org,
 Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: sev_es_trampoline_start undefined symbol referenced errors during
 kunit run

On 4/15/25 18:32, David Gow wrote:
> On Wed, 16 Apr 2025 at 06:30, Shuah Khan <skhan@...uxfoundation.org> wrote:
>>
>> On 4/15/25 16:17, Borislav Petkov wrote:
>>> On Tue, Apr 15, 2025 at 01:06:49PM -0600, Shuah Khan wrote:
>>>> Does your arch/x86/realmode/rm/pasyms.h has reference to sev_es_trampoline_start?
>>>>
>>>> The one in my tree has it.
>>>>
>>>> arch/x86/realmode/rm/pasyms.h:pa_sev_es_trampoline_start = sev_es_trampoline_start
>>>
>>>
>>> # ./tools/testing/kunit/kunit.py run --arch x86_64
>>> ...
>>>
>>> [00:15:36] Elapsed time: 58.840s total, 2.096s configuring, 53.170s building, 3.487s running
>>>
>>> # cat arch/x86/realmode/rm/pasyms.h
>>> cat: arch/x86/realmode/rm/pasyms.h: No such file or directory
>>>
>>> Could explain why I don't see the issue...
>>>
>>
>> I see arch/x86/realmode/rm/pasyms.h on my system. It is a generated
>> file from arch/x86/realmode/rm Makefile
>>
> 
> Aha: I've been able to reproduce this, albeit by not cleaning the tree properly.
> 
> - make ARCH=x86_64 # Build an x86_64 kernel in-tree, with
> CONFIG_AMD_MEM_ENCRYPT=y
> - ./tools/testing/kunit/kunit.py run # Attempt to build and run KUnit
> on a UML kernel (built out-of-tree in the .kunit directory)
> # This will fail, telling you to clean the tree with 'make ARCH=um mrproper'
> - make ARCH=um mrproper # Clean the source tree, but incompletely, as
> the original kernel was built with ARCH=x86_64, not ARCH=um
> # As a result, the pasyms.h file will be left in the tree, as it's not
> part of the UML build
> - ./tools/testing/kunit/kunit.py run --arch x86_64 # Attempt to
> build/run an out-of-tree x86_64 kernel.
> # This will not tell you to clean the source tree, as it was
> (incorrectly) cleaned for the wrong architecture, but will fail due to
> the wrong pasyms.h still being present.
> 
> I'm not sure if this is the same cause as what you're seeing, Shuah,
> but it seems plausible enough. If so, this is really an issue with the
> Makefiles suggesting the wrong make mrproper command (assuming that
> the architecture hasn't changed), or failing to detect that the source
> tree still isn't clean. Maybe that's something we could work around in
> either the arch/um makefiles or in kunit.py (or at least the
> documentation), if we don't want to rework how dirty trees are
> detected.
> 

Yes I am seeing the same thing. However, it doesn't even ask you
to run mrproper because it doesn't seem to think the tree is dirty.

So the fix would be to detect that the tree is dirty?

I just tried make ARCH=x86_64 mrproper and then ran
kunit.py run --arch x86_64


> Either way, this should work after running `make ARCH=x86_64
> mrproper`. Does that work for you?

I just tried make ARCH=x86_64 mrproper and then ran
kunit.py run --arch x86_64

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ