lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210709063741.355325-1-chenlifu@huawei.com>
Date:   Fri, 9 Jul 2021 14:37:40 +0800
From:   Chen Lifu <chenlifu@...wei.com>
To:     <pbonzini@...hat.com>, <shuah@...nel.org>, <bgardon@...gle.com>,
        <wangyanan55@...wei.com>, <axelrasmussen@...gle.com>,
        <drjones@...hat.com>, <chenlifu@...wei.com>, <seanjc@...gle.com>,
        <vkuznets@...hat.com>, <dwmw@...zon.co.uk>,
        <joao.m.martins@...cle.com>, <yangyingliang@...wei.com>,
        <kvm@...r.kernel.org>, <linux-kselftest@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH -next 1/2] selftests: Fix vm_handle_exception undefined error

Compile setftests on x86_64 occurs following error:
make -C tools/testing/selftests
...

x86_64/hyperv_features.c:618:2: warning: implicit declaration of function ‘vm_handle_exception’ [-Wimplicit-function-declaration]
  618 |  vm_handle_exception(vm, GP_VECTOR, guest_gp_handler);
/usr/bin/ld: /tmp/cclOnpml.o: in function `main':
tools/testing/selftests/kvm/x86_64/hyperv_features.c:618: undefined reference to `vm_handle_exception'
collect2: error: ld returned 1 exit status

The reason is that commit b78f4a596692 ("KVM: selftests: Rename vm_handle_exception")
renamed "vm_handle_exception" function to "vm_install_exception_handler" function.

Fix it by replacing "vm_handle_exception" with "vm_install_exception_handler"
in corresponding selftests files.

Signed-off-by: Chen Lifu <chenlifu@...wei.com>
---
 tools/testing/selftests/kvm/x86_64/hyperv_features.c | 2 +-
 tools/testing/selftests/kvm/x86_64/mmu_role_test.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
index 42bd658f52a8..af27c7e829c1 100644
--- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
+++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
@@ -615,7 +615,7 @@ int main(void)
 
 	vm_init_descriptor_tables(vm);
 	vcpu_init_descriptor_tables(vm, VCPU_ID);
-	vm_handle_exception(vm, GP_VECTOR, guest_gp_handler);
+	vm_install_exception_handler(vm, GP_VECTOR, guest_gp_handler);
 
 	pr_info("Testing access to Hyper-V specific MSRs\n");
 	guest_test_msrs_access(vm, addr_gva2hva(vm, msr_gva),
diff --git a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
index 523371cf8e8f..da2325fcad87 100644
--- a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
+++ b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
@@ -71,7 +71,7 @@ static void mmu_role_test(u32 *cpuid_reg, u32 evil_cpuid_val)
 	/* Set up a #PF handler to eat the RSVD #PF and signal all done! */
 	vm_init_descriptor_tables(vm);
 	vcpu_init_descriptor_tables(vm, VCPU_ID);
-	vm_handle_exception(vm, PF_VECTOR, guest_pf_handler);
+	vm_install_exception_handler(vm, PF_VECTOR, guest_pf_handler);
 
 	r = _vcpu_run(vm, VCPU_ID);
 	TEST_ASSERT(r == 0, "vcpu_run failed: %d\n", r);
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ