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:   Tue, 2 Oct 2018 12:33:52 -0700
From:   tip-bot for Mike Travis <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     rajvi.jingar@...el.com, peterz@...radead.org, mingo@...nel.org,
        kstewart@...uxfoundation.org, gregkh@...uxfoundation.org,
        pombredanne@...b.com, rja@....com, hedi.berriche@....com,
        bp@...en8.de, sivanich@....com, russ.anderson@....com,
        pasha.tatashin@...cle.com, gxm.linux.kernel@...il.com,
        hpa@...or.com, mike.travis@....com, douly.fnst@...fujitsu.com,
        tglx@...utronix.de, len.brown@...el.com,
        linux-kernel@...r.kernel.org, dimitri.sivanich@....com
Subject: [tip:x86/urgent] x86/platform/uv: Provide is_early_uv_system()

Commit-ID:  20a8378aa9dd108a01cb0e695599f5257a885c4b
Gitweb:     https://git.kernel.org/tip/20a8378aa9dd108a01cb0e695599f5257a885c4b
Author:     Mike Travis <mike.travis@....com>
AuthorDate: Tue, 2 Oct 2018 13:01:45 -0500
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 2 Oct 2018 21:29:16 +0200

x86/platform/uv: Provide is_early_uv_system()

Introduce is_early_uv_system() which uses efi.uv_systab to decide early
in the boot process whether the kernel runs on a UV system.

This is needed to skip other early setup/init code that might break
the UV platform if done too early such as before necessary ACPI tables
parsing takes place.

Suggested-by: Hedi Berriche <hedi.berriche@....com>
Signed-off-by: Mike Travis <mike.travis@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Russ Anderson <rja@....com>
Reviewed-by: Dimitri Sivanich <sivanich@....com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Russ Anderson <russ.anderson@....com>
Cc: Dimitri Sivanich <dimitri.sivanich@....com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Kate Stewart <kstewart@...uxfoundation.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@...b.com>
Cc: Pavel Tatashin <pasha.tatashin@...cle.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Len Brown <len.brown@...el.com>
Cc: Dou Liyang <douly.fnst@...fujitsu.com>
Cc: Xiaoming Gao <gxm.linux.kernel@...il.com>
Cc: Rajvi Jingar <rajvi.jingar@...el.com>
Link: https://lkml.kernel.org/r/20181002180144.801700401@stormcage.americas.sgi.com

---
 arch/x86/include/asm/uv/uv.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h
index a80c0673798f..e60c45fd3679 100644
--- a/arch/x86/include/asm/uv/uv.h
+++ b/arch/x86/include/asm/uv/uv.h
@@ -10,8 +10,13 @@ struct cpumask;
 struct mm_struct;
 
 #ifdef CONFIG_X86_UV
+#include <linux/efi.h>
 
 extern enum uv_system_type get_uv_system_type(void);
+static inline bool is_early_uv_system(void)
+{
+	return !((efi.uv_systab == EFI_INVALID_TABLE_ADDR) || !efi.uv_systab);
+}
 extern int is_uv_system(void);
 extern int is_uv_hubless(void);
 extern void uv_cpu_init(void);
@@ -23,6 +28,7 @@ extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
 #else	/* X86_UV */
 
 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
+static inline bool is_early_uv_system(void)	{ return 0; }
 static inline int is_uv_system(void)	{ return 0; }
 static inline int is_uv_hubless(void)	{ return 0; }
 static inline void uv_cpu_init(void)	{ }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ