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: <88a4052c-ac37-4958-af2a-a3066e8b82bd@linuxfoundation.org>
Date: Tue, 15 Apr 2025 16:29:58 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Borislav Petkov <bp@...en8.de>
Cc: thomas.lendacky@....com, David Gow <davidgow@...gle.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 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

Here is the target information.

REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y))

sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p'

quiet_cmd_pasyms = PASYMS  $@
       cmd_pasyms = $(NM) $(real-prereqs) | sed $(sed-pasyms) | sort | uniq > $@

targets += pasyms.h
$(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
         $(call if_changed,pasyms)

The key is how and why this file gets generated and why the reference

pa_sev_es_trampoline_start = sev_es_trampoline_start

is added unconditionally even when  CONFIG_AMD_MEM_ENCRYPT is not
enabled. I think the logic should be fixed to take AMD_MEM_ENCRYPT
enabled or disabled into account when this pasyms.h file is generated.

kunit test run starts with no config file and generates its own, so it
isn't coming from any existing config.

thanks,
-- Shuah




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ