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]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux