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:   Thu, 05 Dec 2019 23:35:54 -0500
From:   "Valdis Klētnieks" <valdis.kletnieks@...edu>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>
cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] x86/build: provide missing include file for capflags.c

When building with C=2, sparse warns about missing definitions:

  CHECK   arch/x86/kernel/cpu/capflags.c
arch/x86/kernel/cpu/capflags.c:5:12: warning: symbol 'x86_cap_flags' was not declared. Should it be static?
arch/x86/kernel/cpu/capflags.c:261:12: warning: symbol 'x86_bug_flags' was not declared. Should it be static?

Make the script that generates the C file create the needed #include.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>

diff --git a/arch/x86/kernel/cpu/mkcapflags.sh b/arch/x86/kernel/cpu/mkcapflags.sh
index aed45b8895d5..f26caa6b6f2d 100644
--- a/arch/x86/kernel/cpu/mkcapflags.sh
+++ b/arch/x86/kernel/cpu/mkcapflags.sh
@@ -56,6 +56,10 @@ trap 'rm "$OUT"' EXIT
 	echo "#include <asm/cpufeatures.h>"
 	echo "#endif"
 	echo ""
+	echo "#ifndef _ASM_X86_CPUFEATURE_H"
+	echo "#include <asm/cpufeature.h>"
+	echo "#endif"
+	echo ""
 
 	dump_array "x86_cap_flags" "NCAPINTS*32" "X86_FEATURE_" ""
 	echo ""


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ