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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1558101713-15325-1-git-send-email-cai@lca.pw>
Date:   Fri, 17 May 2019 10:01:53 -0400
From:   Qian Cai <cai@....pw>
To:     pbonzini@...hat.com, rkrcmar@...hat.com
Cc:     karahmed@...zon.de, konrad.wilk@...cle.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Qian Cai <cai@....pw>
Subject: [PATCH -next] kvm: fix compilation errors with mem[re|un]map()

The linux-next commit e45adf665a53 ("KVM: Introduce a new guest mapping
API") introduced compilation errors on arm64.

arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1764:9: error: implicit
declaration of function 'memremap'
[-Werror,-Wimplicit-function-declaration]
                hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
                      ^
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1764:9: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1764:46: error: use of
undeclared identifier 'MEMREMAP_WB'
                hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
                                                           ^
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:1796:3: error: implicit
declaration of function 'memunmap'
[-Werror,-Wimplicit-function-declaration]
                memunmap(map->hva);

Fixed it by including io.h in kvm_main.c.

Signed-off-by: Qian Cai <cai@....pw>
---
 virt/kvm/kvm_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 8d83a787fd6b..5c5102799c2c 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -51,6 +51,7 @@
 #include <linux/slab.h>
 #include <linux/sort.h>
 #include <linux/bsearch.h>
+#include <linux/io.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ