]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: disable stack protector for all KVM tests
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 13 Mar 2019 19:43:14 +0000 (12:43 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Mar 2019 16:29:08 +0000 (17:29 +0100)
commitada0f61418ae3dc2702f32d3b9ca803bf96a53dc
tree205302c6352b93cd4254b6a32b9adfb455a81164
parenta7611293229c328f31ef54b7c56b3bb6507f6eaf
KVM: selftests: disable stack protector for all KVM tests

Since 4.8.3, gcc has enabled -fstack-protector by default.  This is
problematic for the KVM selftests as they do not configure fs or gs
segments (the stack canary is pulled from fs:0x28).  With the default
behavior, gcc will insert a stack canary on any function that creates
buffers of 8 bytes or more.  As a result, ucall() will hit a triple
fault shutdown due to reading a bad fs segment when inserting its
stack canary, i.e. every test fails with an unexpected SHUTDOWN.

Fixes: e8a85636af5b4 ("kvm: selftests: introduce ucall")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/Makefile