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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  3 Aug 2018 10:05:50 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc:     x86@...nel.org, jgross@...e.com, kstewart@...uxfoundation.org,
        gregkh@...uxfoundation.org, boris.ostrovsky@...cle.com,
        linux-kernel@...r.kernel.org, jdelvare@...e.de,
        astrachan@...gle.com, mka@...omium.org, arnd@...db.de,
        tstellar@...hat.com, sedat.dilek@...il.com,
        David.Laight@...lab.com,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        stable@...r.kernel.org
Subject: [PATCH] x86/irqflags: provide a declaration for native_save_fl

Fixes commit d0a8d9378d16 ("x86/paravirt: Make native_save_fl() extern
inline").

It was reported that the above commit was causing users of gcc < 4.9 to
observe -Werror=missing-prototypes errors.

Indeed, it seems that:
extern inline unsigned long native_save_fl(void) { return 0; }

compiled with -Werror=missing-prototypes produces this warning in gcc <
4.9, but not gcc >= 4.9.

Cc: stable@...r.kernel.org # 4.17, 4.14, 4.9, 4.4
Reported-by: David Laight <david.laight@...lab.com>
Reported-by: Jean Delvare <jdelvare@...e.de>
Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
---
 arch/x86/include/asm/irqflags.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index c4fc17220df9..c14f2a74b2be 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -13,6 +13,8 @@
  * Interrupt control:
  */
 
+/* Declaration required for gcc < 4.9 to prevent -Werror=missing-prototypes */
+extern inline unsigned long native_save_fl(void);
 extern inline unsigned long native_save_fl(void)
 {
 	unsigned long flags;
-- 
2.18.0.597.ga71716f1ad-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ