[LTP] [PATCH v2 2/7] Add test for CVE 2021-3656

Petr Vorel pvorel@suse.cz
Fri May 26 16:07:59 CEST 2023


Hi Martin,

...
> --- /dev/null
> +++ b/testcases/kernel/kvm/kvm_svm02.c
...
> +/* Load FS, GS, TR and LDTR state from vmsave_buf */
> +static int guest_vmload(void)
> +{
> +	asm (
> +		"vmload\n"
Unfortunately, it fails on Debian oldstable [1].

kvm_svm02.c:37:3: error: too few operands for instruction
                "vmload\n"
                ^
<inline asm>:1:2: note: instantiated into assembly here
        vmload
        ^
kvm_svm02.c:48:3: error: too few operands for instruction
                "vmsave\n"
                ^
<inline asm>:1:2: note: instantiated into assembly here
        vmsave
        ^
2 errors generated.
make[3]: *** [/__w/ltp/ltp/testcases/kernel/kvm/Makefile:63: kvm_svm02-payload.o] Error 1

I wonder if there is an easy fix or reasonable simple way how to detect
unsupported toolchain.

Kind regards,
Petr

[1] https://github.com/pevik/ltp/actions/runs/5091551272/jobs/9151721119


More information about the ltp mailing list