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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Jul 2019 10:28:07 -0400
From:   Sasha Levin <>
Cc:     Masahiro Yamada <>,
        Thomas Gleixner <>,
        "H. Peter Anvin" <>, Borislav Petkov <>,
        Sasha Levin <>
Subject: [PATCH AUTOSEL 4.14 073/105] x86/build: Add 'set -e' to to delete broken capflags.c

From: Masahiro Yamada <>

[ Upstream commit bc53d3d777f81385c1bb08b07bd1c06450ecc2c1 ]

Without 'set -e', shell scripts continue running even after any
error occurs. The missed 'set -e' is a typical bug in shell scripting.

For example, when a disk space shortage occurs while this script is
running, it actually ends up with generating a truncated capflags.c.

Yet, continues running and exits with 0. So, the build
system assumes it has succeeded.

It will not be re-generated in the next invocation of Make since its
timestamp is newer than that of any of the source files.

Add 'set -e' so that any error in this script is caught and propagated
to the build system.

Since 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"),
make automatically deletes the target on any failure. So, the broken
capflags.c will be deleted automatically.

Signed-off-by: Masahiro Yamada <>
Signed-off-by: Thomas Gleixner <>
Cc: "H. Peter Anvin" <>
Cc: Borislav Petkov <>
Signed-off-by: Sasha Levin <>
 arch/x86/kernel/cpu/ | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/ b/arch/x86/kernel/cpu/
index d0dfb892c72f..aed45b8895d5 100644
--- a/arch/x86/kernel/cpu/
+++ b/arch/x86/kernel/cpu/
@@ -4,6 +4,8 @@
 # Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeatures.h
+set -e

Powered by blists - more mailing lists