Hello,
Trying to build mainline kernel with gcc12 and selftests we get the following error:
00:01:22 In function ‘native_read_cr2’, 00:01:22 inlined from ‘vmx_vcpu_enter_exit’ at arch/x86/kvm/vmx/vmx.c:6772:24: 00:01:22 ./arch/x86/include/asm/special_insns.h:36:9: error: array subscript 0 is outside array bounds of ‘unsigned int[0]’ [-Werror=array-bounds] 00:01:22 36 | asm volatile("mov %%cr2,%0\n\t" : "=r" (val) : __FORCE_ORDER); 00:01:22 | ^~~ 00:01:22 In function ‘native_read_cr2’, 00:01:22 inlined from ‘vmx_vcpu_enter_exit’ at arch/x86/kvm/vmx/vmx.c:6778:19: 00:01:22 ./arch/x86/include/asm/special_insns.h:36:9: error: array subscript 0 is outside array bounds of ‘unsigned int[0]’ [-Werror=array-bounds] 00:01:22 36 | asm volatile("mov %%cr2,%0\n\t" : "=r" (val) : __FORCE_ORDER); 00:01:22 | ^~~ 00:01:22 cc1: all warnings being treated as errors 00:01:22 make[4]: *** [scripts/Makefile.build:288: arch/x86/kvm/vmx/vmx.o] Error 1 00:01:22 make[3]: *** [scripts/Makefile.build:550: arch/x86/kvm] Error 2
Full build log: https://s3.us-east-1.amazonaws.com/arr-cki-prod-datawarehouse-public/datawar...
build config: https://s3.us-east-1.amazonaws.com/arr-cki-prod-datawarehouse-public/datawar...
Thanks, Bruno Goncalves
linux-kselftest-mirror@lists.linaro.org