Re: [PATCH] selftests/sgx: Fix build error caused by missing dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2021-12-07 at 11:40 -0800, Reinette Chatre wrote:
> Commit f0ff2447b861 ("selftests/sgx: Add a new kselftest:
> Unclobbered_vdso_oversubscribed") depends on __cpuid() without
> providing the dependency and thus introduces a build error:
> 
> $ make
> gcc -Wall -Werror -g -I../../../../tools/include -fPIC -z noexecstack -c main.c -o /path/linux/tools/testing/selftests/sgx/main.o
> main.c: In function ‘get_total_epc_mem’:
> main.c:296:3: error: implicit declaration of function ‘__cpuid’ [-Werror=implicit-function-declaration]
>   296 |   __cpuid(&eax, &ebx, &ecx, &edx);
>       |   ^~~~~~~
> cc1: all warnings being treated as errors
> make: *** [Makefile:33: /path/linux/tools/testing/selftests/sgx/main.o] Error 1
> $
> 
> Make the kernel's __cpuid() available locally in support of the
> test's usage.

It's too abstract, rather

"Clone kernel's __cpuid() implementation to the self-test in order
 to make it available for the EPC enumeration code."

> Fixes: f0ff2447b861 ("selftests/sgx: Add a new kselftest: Unclobbered_vdso_oversubscribed")
> Reported-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
> Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

The code change is acceptable.

/Jarkko




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux