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]
Message-ID: <20200907185430.685975987@hpe.com>
Date:   Mon, 07 Sep 2020 13:54:33 -0500
From:   Mike Travis <mike.travis@....com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, Steve Wahl <steve.wahl@....com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...e.de>
Cc:     Dimitri Sivanich <dimitri.sivanich@....com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Russ Anderson <russ.anderson@....com>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Jian Cai <caij2003@...il.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org
Subject: [PATCH 03/12] x86/platform/uv: Adjust references in UV kernel modules

There is a symbol clash from the auto-generated uv_mmrs.h file that
clashes with code in the UV kernel modules (is_uv() is the symbol).
Change those prior to the symbol clash so as to not cause a compile error.

Signed-off-by: Mike Travis <mike.travis@....com>
Reviewed-by: Dimitri Sivanich <dimitri.sivanich@....com>
Reviewed-by: Steve Wahl <steve.wahl@....com>
---
 drivers/misc/sgi-xp/xp.h            |   11 ++++++-----
 drivers/misc/sgi-xp/xp_main.c       |    7 ++++---
 drivers/misc/sgi-xp/xp_uv.c         |    9 ++++++---
 drivers/misc/sgi-xp/xpc_main.c      |    9 +++++----
 drivers/misc/sgi-xp/xpc_partition.c |    5 +++--
 drivers/misc/sgi-xp/xpnet.c         |    5 +++--
 6 files changed, 27 insertions(+), 19 deletions(-)

--- linux.orig/drivers/misc/sgi-xp/xp.h
+++ linux/drivers/misc/sgi-xp/xp.h
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2004-2008 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -17,11 +18,11 @@
 
 #if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV
 #include <asm/uv/uv.h>
-#define is_uv()		is_uv_system()
+#define is_uv_sys()		is_uv_system()
 #endif
 
-#ifndef is_uv
-#define is_uv()		0
+#ifndef is_uv_sys
+#define is_uv_sys()		0
 #endif
 
 #ifdef USE_DBUG_ON
@@ -79,7 +80,7 @@
 
 #define XPC_MSG_SIZE(_payload_size) \
 				ALIGN(XPC_MSG_HDR_MAX_SIZE + (_payload_size), \
-				      is_uv() ? 64 : 128)
+				      is_uv_sys() ? 64 : 128)
 
 
 /*
--- linux.orig/drivers/misc/sgi-xp/xp_main.c
+++ linux/drivers/misc/sgi-xp/xp_main.c
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2008 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -233,7 +234,7 @@ xp_init(void)
 	for (ch_number = 0; ch_number < XPC_MAX_NCHANNELS; ch_number++)
 		mutex_init(&xpc_registrations[ch_number].mutex);
 
-	if (is_uv())
+	if (is_uv_sys())
 		ret = xp_init_uv();
 	else
 		ret = 0;
@@ -249,7 +250,7 @@ module_init(xp_init);
 void __exit
 xp_exit(void)
 {
-	if (is_uv())
+	if (is_uv_sys())
 		xp_exit_uv();
 }
 
--- linux.orig/drivers/misc/sgi-xp/xp_uv.c
+++ linux/drivers/misc/sgi-xp/xp_uv.c
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -148,7 +149,9 @@ xp_restrict_memprotect_uv(unsigned long
 enum xp_retval
 xp_init_uv(void)
 {
-	BUG_ON(!is_uv());
+	WARN_ON(!is_uv_sys());
+	if (!is_uv_sys())
+		return xpUnsupported;
 
 	xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
 #ifdef CONFIG_X86
@@ -168,5 +171,5 @@ xp_init_uv(void)
 void
 xp_exit_uv(void)
 {
-	BUG_ON(!is_uv());
+	WARN_ON(!is_uv_sys());
 }
--- linux.orig/drivers/misc/sgi-xp/xpc_main.c
+++ linux/drivers/misc/sgi-xp/xpc_main.c
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2009 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -1043,7 +1044,7 @@ xpc_do_exit(enum xp_retval reason)
 
 	xpc_teardown_partitions();
 
-	if (is_uv())
+	if (is_uv_sys())
 		xpc_exit_uv();
 }
 
@@ -1226,7 +1227,7 @@ xpc_init(void)
 	dev_set_name(xpc_part, "part");
 	dev_set_name(xpc_chan, "chan");
 
-	if (is_uv()) {
+	if (is_uv_sys()) {
 		ret = xpc_init_uv();
 
 	} else {
@@ -1312,7 +1313,7 @@ out_2:
 
 	xpc_teardown_partitions();
 out_1:
-	if (is_uv())
+	if (is_uv_sys())
 		xpc_exit_uv();
 	return ret;
 }
--- linux.orig/drivers/misc/sgi-xp/xpc_partition.c
+++ linux/drivers/misc/sgi-xp/xpc_partition.c
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2004-2008 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -433,7 +434,7 @@ xpc_discovery(void)
 	 */
 	region_size = xp_region_size;
 
-	if (is_uv())
+	if (is_uv_sys())
 		max_regions = 256;
 	else {
 		max_regions = 64;
--- linux.orig/drivers/misc/sgi-xp/xpnet.c
+++ linux/drivers/misc/sgi-xp/xpnet.c
@@ -3,7 +3,8 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1999-2009 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (c) 2018-2020 Hewlett Packard Enterprise Development LP
+ * Copyright (c) 2008-2017 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 /*
@@ -515,7 +516,7 @@ xpnet_init(void)
 {
 	int result;
 
-	if (!is_uv())
+	if (!is_uv_sys())
 		return -ENODEV;
 
 	dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ