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]
Date:   Mon, 19 Dec 2022 17:55:40 +0800
From:   Like Xu <like.xu.linux@...il.com>
To:     seanjc@...gle.com
Cc:     Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>,
        kvm@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] KVM: selftests: Install sanitised kernel headers before compilation

From: Like Xu <likexu@...cent.com>

On many automated test boxes, selftests in a completely clean src tree
will be compiled independently: "make -j -C tools/testing/selftests/kvm".
Sometimes the compilation will fail and produce a false positive just
due to missing kernel headers (or others hidden behind the complete
kernel compilation or installation).

Optimize this situation by explicitly adding the installation of sanitised
kernel headers before compilation to the Makefile.

Reported-by: Sean Christopherson <seanjc@...gle.com>
Signed-off-by: Like Xu <likexu@...cent.com>
---
 tools/testing/selftests/kvm/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 947676983da1..a33e2f72d745 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -202,6 +202,11 @@ TEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(UNAME_M))
 LIBKVM += $(LIBKVM_$(UNAME_M))
 
 INSTALL_HDR_PATH = $(top_srcdir)/usr
+
+ifeq ($(shell make -j -C ../../../.. headers_install),)
+	$(error "Please install sanitised kernel headers manually.")
+endif
+
 LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
 LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include
 ifeq ($(ARCH),x86_64)
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ