[OS-BUILD PATCHv2 6/6] [redhat] kernel/rh_messages.c: move hardware tables to rh_messages.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Scott Weaver <scweaver@xxxxxxxxxx>

[redhat] kernel/rh_messages.c: move hardware tables to rh_messages.h

This moves the static message strings and hardware tables that were
in rh_messages.c into an auto-generated header file (rh_messages.h) that
contains the lists of unmaintained, deprecated and disabled drivers and
pci devices.

For kernel-ark, there is no need to maintain driver and device lists so
they are left empty. Note that for Gemini, there would be two separate
lists depending on if we build RHEL 9 or 10.

Signed-off-by: Scott Weaver <scweaver@xxxxxxxxxx>

diff --git a/kernel/rh_messages.c b/kernel/rh_messages.c
index blahblah..blahblah 100644
--- a/kernel/rh_messages.c
+++ b/kernel/rh_messages.c
@@ -1,8 +1,3 @@
-/*
- * WARNING: This file is auto-generated by an internal Red Hat script and,
- * in general, should not be modified by hand.
- */
-
 /*
  * The following functions are used by Red Hat to indicate to users that
  * hardware and drivers are unsupported, or have limited support in RHEL major
@@ -23,208 +18,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-
-#define DEV_DESC_LEN 256
-static const char *rh_deprecated_drivers[] = {
-	"team",
-	"ebtables",
-	"arp_tables",
-	"ip_tables",
-	"ip6_tables",
-	"ip_set",
-	"nft_compat",
-	"firewire-core",
-	""     /* Terminating entry */
-};
-
-static const char *rh_deprecated_init_fns[] = {
-	"team_module_init",
-	"ebtables_init",
-	"arp_tables_init",
-	"ip_tables_init",
-	"ip6_tables_init",
-	"ip_set_init",
-	"nft_compat_module_init",
-	"fw_core_init",
-	""     /* Terminating entry */
-};
-
-static const char *rh_unmaintained_drivers[] = {
-	"bnx2",
-	"e1000",
-	"dl2k",
-	"hpsa",
-	"mptbase",
-	"mptsas",
-	"mptscsih",
-	"mptspi",
-	"myri10ge",
-	"netxen_nic",
-	"qla3xxx",
-	"hdlc_fr",
-	"nvmet-fc",
-	"nvmet-tcp",
-	"team",
-	"ebtables",
-	"arp_tables",
-	"ip_tables",
-	"ip6_tables",
-	"ip_set",
-	"nft_compat",
-	"nicvf",
-	"nicpf",
-	""     /* Terminating entry */
-};
-
-static const char *rh_unmaintained_init_fns[] = {
-	"bnx2_pci_driver_init",
-	"e1000_init_module",
-	"rio_driver_init",
-	"hpsa_init",
-	"fusion_init",
-	"mptsas_init",
-	"fusion_init",
-	"mptspi_init",
-	"myri10ge_init_module",
-	"netxen_init_module",
-	"ql3xxx_driver_init",
-	"hdlc_fr_init",
-	"nvmet_fc_init_module",
-	"nvmet_tcp_init",
-	"team_module_init",
-	"ebtables_init",
-	"arp_tables_init",
-	"ip_tables_init",
-	"ip6_tables_init",
-	"ip_set_init",
-	"nft_compat_module_init",
-	"nicvf_init_module",
-	"nic_init_module",
-	""     /* Terminating entry */
-};
-
-static const struct pci_device_id rh_deprecated_pci_devices[] = {
-	{0}     /* Terminating entry */
-};
-
-static const struct pci_device_id rh_disabled_pci_devices[] = {
-	{ 0x1011, 0x0046, 0x103c, 0x10c2 },
-	{ 0x1011, 0x0046, 0x9005, 0x0364 },
-	{ 0x1011, 0x0046, 0x9005, 0x0365 },
-	{ 0x1011, 0x0046, 0x9005, 0x1364 },
-	{ 0x1028, 0x0001, 0x1028, 0x0001 },
-	{ 0x1028, 0x0002, 0x1028, 0x0002 },
-	{ 0x1028, 0x0002, 0x1028, 0x00d1 },
-	{ 0x1028, 0x0002, 0x1028, 0x00d9 },
-	{ 0x1028, 0x0003, 0x1028, 0x0003 },
-	{ 0x1028, 0x0004, 0x1028, 0x00d0 },
-	{ 0x1028, 0x000a, 0x1028, 0x0106 },
-	{ 0x1028, 0x000a, 0x1028, 0x011b },
-	{ 0x1028, 0x000a, 0x1028, 0x0121 },
-	{ 0x9005, 0x0200, 0x9005, 0x0200 },
-	{ 0x9005, 0x0283, 0x9005, 0x0283 },
-	{ 0x9005, 0x0284, 0x9005, 0x0284 },
-	{ 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x9005, 0x0285, 0x1014, 0x02F2 },
-	{ 0x9005, 0x0285, 0x1014, 0x0312 },
-	{ 0x9005, 0x0285, 0x1028, PCI_ANY_ID },
-	{ 0x9005, 0x0285, 0x1028, 0x0287 },
-	{ 0x9005, 0x0285, 0x103C, 0x3227 },
-	{ 0x9005, 0x0285, 0x17aa, PCI_ANY_ID },
-	{ 0x9005, 0x0285, 0x17aa, 0x0286 },
-	{ 0x9005, 0x0285, 0x17aa, 0x0287 },
-	{ 0x9005, 0x0285, 0x9005, 0x0285 },
-	{ 0x9005, 0x0285, 0x9005, 0x0286 },
-	{ 0x9005, 0x0285, 0x9005, 0x0287 },
-	{ 0x9005, 0x0285, 0x9005, 0x0288 },
-	{ 0x9005, 0x0285, 0x9005, 0x0289 },
-	{ 0x9005, 0x0285, 0x9005, 0x028a },
-	{ 0x9005, 0x0285, 0x9005, 0x028b },
-	{ 0x9005, 0x0285, 0x9005, 0x028e },
-	{ 0x9005, 0x0285, 0x9005, 0x028f },
-	{ 0x9005, 0x0285, 0x9005, 0x0290 },
-	{ 0x9005, 0x0285, 0x9005, 0x0291 },
-	{ 0x9005, 0x0285, 0x9005, 0x0292 },
-	{ 0x9005, 0x0285, 0x9005, 0x0293 },
-	{ 0x9005, 0x0285, 0x9005, 0x0294 },
-	{ 0x9005, 0x0285, 0x9005, 0x0296 },
-	{ 0x9005, 0x0285, 0x9005, 0x0297 },
-	{ 0x9005, 0x0285, 0x9005, 0x0298 },
-	{ 0x9005, 0x0285, 0x9005, 0x0299 },
-	{ 0x9005, 0x0285, 0x9005, 0x029a },
-	{ 0x9005, 0x0285, 0x9005, 0x02a4 },
-	{ 0x9005, 0x0285, 0x9005, 0x02a5 },
-	{ 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x9005, 0x0286, 0x1014, 0x9540 },
-	{ 0x9005, 0x0286, 0x1014, 0x9580 },
-	{ 0x9005, 0x0286, 0x9005, 0x028c },
-	{ 0x9005, 0x0286, 0x9005, 0x028d },
-	{ 0x9005, 0x0286, 0x9005, 0x029b },
-	{ 0x9005, 0x0286, 0x9005, 0x029c },
-	{ 0x9005, 0x0286, 0x9005, 0x029d },
-	{ 0x9005, 0x0286, 0x9005, 0x029e },
-	{ 0x9005, 0x0286, 0x9005, 0x029f },
-	{ 0x9005, 0x0286, 0x9005, 0x02a0 },
-	{ 0x9005, 0x0286, 0x9005, 0x02a1 },
-	{ 0x9005, 0x0286, 0x9005, 0x02a2 },
-	{ 0x9005, 0x0286, 0x9005, 0x02a3 },
-	{ 0x9005, 0x0286, 0x9005, 0x02a6 },
-	{ 0x9005, 0x0286, 0x9005, 0x0800 },
-	{ 0x9005, 0x0287, 0x9005, 0x0800 },
-	{ 0x9005, 0x0288, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x19a2, 0x0700, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x19a2, 0x0211, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x19a2, 0x0710, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x19a2, 0x0221, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x19a2, 0xe220, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0060, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0078, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x007C, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0411, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0413, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1028, 0x0015, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0064, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0065, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0070, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0072, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0074, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0076, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0077, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x007E, PCI_ANY_ID, PCI_ANY_ID },
-	{0}     /* Terminating entry */
-};
-
-static const struct pci_device_id rh_unmaintained_pci_devices[] = {
-	{ 0x10df, 0x0724, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x10df, 0xe200, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x10df, 0xe220, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x10df, 0xf011, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x10df, 0xf015, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x10df, 0xf100, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x10df, 0xfc40, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x005b, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0071, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0073, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0079, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x006E, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0080, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0081, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0082, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0083, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0084, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0085, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0086, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1000, 0x0087, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1077, 0x2031, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1077, 0x2532, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1077, 0x8031, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1924, 0x0803, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x1924, 0x0813, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x177d, 0xa01e, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x177d, 0xa034, PCI_ANY_ID, PCI_ANY_ID },
-	{ 0x177d, 0x0011, PCI_ANY_ID, PCI_ANY_ID },
-	{0}     /* Terminating entry */
-};
+#include "rh_messages.h"
 
 /**
  * mark_hardware_unmaintained() - Mark hardware as unmaintained.
@@ -252,7 +46,7 @@ void mark_hardware_unmaintained(const char *driver_name, char *fmt, ...)
 
 	va_start(args, fmt);
 	vsnprintf(device_description, DEV_DESC_LEN, fmt, args);
-	pr_crit("Warning: Unmaintained Hardware is detected: %s:%s\n",
+	pr_crit(RH_UNMAINT_HW,
 		driver_name, device_description);
 	va_end(args);
 }
@@ -282,7 +76,7 @@ void mark_hardware_deprecated(const char *driver_name, char *fmt, ...)
 
 	va_start(args, fmt);
 	vsnprintf(device_description, DEV_DESC_LEN, fmt, args);
-	pr_crit("Warning: Deprecated Hardware is detected: %s:%s will not be maintained in a future major release and may be disabled\n",
+	pr_crit(RH_DEPRECATED_HW,
 		driver_name, device_description);
 	va_end(args);
 }
@@ -311,7 +105,7 @@ static void mark_hardware_disabled(const char *driver_name, char *fmt, ...)
 
 	va_start(args, fmt);
 	vsnprintf(device_description, DEV_DESC_LEN, fmt, args);
-	pr_crit("Warning: Disabled Hardware is detected: %s:%s is no longer enabled in this release.\n",
+	pr_crit(RH_DISABLED_HW,
 		driver_name, device_description);
 	va_end(args);
 }
@@ -398,7 +192,7 @@ static void driver_unmaintained(const char* module_name)
 
 	while (rh_unmaintained_drivers[i]) {
 		if (strcmp(rh_unmaintained_drivers[i], module_name) == 0) {
-			pr_crit("Warning: Unmaintained driver is detected: %s\n", module_name);
+			pr_crit(RH_UNMAINT_DR, module_name);
 			return;
 		}
 		i++;
@@ -427,7 +221,7 @@ static void driver_deprecated(const char* module_name)
 
 	while (rh_deprecated_drivers[i]) {
 		if (strcmp(rh_deprecated_drivers[i], module_name) == 0) {
-			pr_crit("Warning: Deprecated Driver is detected: %s will not be maintained in a future major release and may be disabled\n", module_name);
+			pr_crit(RH_DEPRECATED_DR, module_name);
 			return;
 		}
 		i++;
@@ -459,7 +253,7 @@ static void init_fn_unmaintained(char* fn_name)
 
 	while (rh_unmaintained_init_fns[i]) {
 		if (strcmp(rh_unmaintained_init_fns[i], fn_name) == 0) {
-			pr_crit("Warning: Unmaintained driver is detected: %s\n", fn_name);
+			pr_crit(RH_UNMAINT_DR, fn_name);
 			return;
 		}
 		i++;
@@ -488,7 +282,7 @@ static void init_fn_deprecated(char* fn_name)
 
 	while (rh_deprecated_init_fns[i]) {
 		if (strcmp(rh_deprecated_init_fns[i], fn_name) == 0) {
-			pr_crit("Warning: Deprecated Driver is detected: %s will not be maintained in a future major release and may be disabled\n", fn_name);
+			pr_crit(RH_DEPRECATED_DR, fn_name);
 			return;
 		}
 		i++;
@@ -519,9 +313,7 @@ void mark_tech_preview(const char *msg, struct module *mod)
 		str = mod->name;
 #endif
 
-	pr_warn("TECH PREVIEW: %s may not be fully supported.\n"
-		"Please review provided documentation for limitations.\n",
-		(str ? str : "kernel"));
+	pr_warn(RH_TECH_PREVIEW, (str ? str : "kernel"));
 	add_taint(TAINT_AUX, LOCKDEP_STILL_OK);
 #ifdef CONFIG_MODULES
 	if (mod)
@@ -529,34 +321,33 @@ void mark_tech_preview(const char *msg, struct module *mod)
 #endif
 }
 EXPORT_SYMBOL(mark_tech_preview);
+
 /**
  * mark_partner_supported() - Mark driver or kernel subsystem as 'Partner Supported'
  * @msg: Driver or kernel subsystem name
  *
  * Called to minimize the support status of a new driver.  This does TAINT the
- * kernel.  Calling this function indicates that the driver or subsystem has
+ * kernel.  Calling this function indicates that the driver or subsystem
  * is not supported directly by Red Hat but by a partner engineer.
  *
  * Reserved for Internal Red Hat use only.
  */
 void mark_partner_supported(const char *msg, struct module *mod)
 {
-	const char *str = NULL;
+        const char *str = NULL;
 
-	if (msg)
-		str = msg;
+        if (msg)
+                str = msg;
 #ifdef CONFIG_MODULES
 	else if (mod)
 		str = mod->name;
 #endif
 
-	pr_warn("Notice: %s is a Partner Supported GPL module and not supported directly by Red Hat.\n"
-		"Please contact your provider for support.\n",
-		(str ? str : "kernel"));
-	add_taint(TAINT_PARTNER_SUPPORTED, LOCKDEP_STILL_OK);
+        pr_warn(RH_PARTNER_SUPPORTED, (str ? str : "kernel"));
+        add_taint(TAINT_PARTNER_SUPPORTED, LOCKDEP_STILL_OK);
 #ifdef CONFIG_MODULES
-	if (mod)
-		mod->taints |= (1U << TAINT_PARTNER_SUPPORTED);
+        if (mod)
+                mod->taints |= (1U << TAINT_PARTNER_SUPPORTED);
 #endif
 }
 EXPORT_SYMBOL(mark_partner_supported);
diff --git a/kernel/rh_messages.h b/kernel/rh_messages.h
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/kernel/rh_messages.h
@@ -0,0 +1,109 @@
+/*
+ * WARNING: This file is auto-generated by an internal Red Hat script and,
+ * in general, should not be modified by hand.
+ */
+
+/*
+ * The following tables are used by Red Hat to define what hardware and drivers
+ * are unsupported, or have limited support in RHEL major and minor releases.
+ *
+ * Generally, the process of disabling a driver or device in RHEL requires the
+ * driver or device to be marked as 'deprecated' in all existing releases, and
+ * then either 'unmaintained' or 'disabled' in a future release.
+ *
+ * In general, deprecated and unmaintained drivers continue to receive security
+ * related fixes until they are disabled.
+ */
+ 
+#ifndef __RH_MESSAGES_H
+#define __RH_MESSAGES_H
+
+#include <linux/version.h>
+#include <linux/pci.h>
+
+#define DEV_DESC_LEN 256
+
+#define RH_UNMAINT_HW "Warning: Unmaintained Hardware is detected: %s:%s\n"
+
+#define RH_UNMAINT_DR "Warning: Unmaintained driver is detected: %s\n"
+
+#define RH_DEPRECATED_HW "Warning: Deprecated Hardware is detected: %s:%s " \
+			 "will not be maintained in a future major release " \
+			 "and may be disabled\n"
+
+#define RH_DEPRECATED_DR "Warning: Deprecated Driver is detected: %s will " \
+			 "not be maintained in a future major release and " \
+			 "may be disabled\n"
+
+#define RH_DISABLED_HW "Warning: Disabled Hardware is detected: %s:%s is " \
+		       "no longer enabled in this release.\n"
+
+#define RH_TECH_PREVIEW "TECH PREVIEW: %s may not be fully supported.\n" \
+			"Please review provided documentation for " \
+			"limitations.\n"
+
+#define RH_PARTNER_SUPPORTED "Warning: %s is a Partner supported GPL " \
+			     "module and not supported directly by Red Hat.\n"
+
+#if RHEL_MAJOR == 9
+
+static const char *rh_deprecated_drivers[] = {
+	0     /* Terminating entry */
+};
+
+static const char *rh_deprecated_init_fns[] = {
+	0     /* Terminating entry */
+};
+
+static const char *rh_unmaintained_drivers[] = {
+	0     /* Terminating entry */
+};
+
+static const char *rh_unmaintained_init_fns[] = {
+	0     /* Terminating entry */
+};
+
+static const struct pci_device_id rh_deprecated_pci_devices[] = {
+	{0}     /* Terminating entry */
+};
+
+static const struct pci_device_id rh_disabled_pci_devices[] = {
+	{0}     /* Terminating entry */
+};
+
+static const struct pci_device_id rh_unmaintained_pci_devices[] = {
+	{0}     /* Terminating entry */
+};
+
+#else /* RHEL-10 */
+
+static const char *rh_deprecated_drivers[] = {
+	0     /* Terminating entry */
+};
+
+static const char *rh_deprecated_init_fns[] = {
+	0     /* Terminating entry */
+};
+
+static const char *rh_unmaintained_drivers[] = {
+	0     /* Terminating entry */
+};
+
+static const char *rh_unmaintained_init_fns[] = {
+	0     /* Terminating entry */
+};
+
+static const struct pci_device_id rh_deprecated_pci_devices[] = {
+	{0}     /* Terminating entry */
+};
+
+static const struct pci_device_id rh_disabled_pci_devices[] = {
+	{0}     /* Terminating entry */
+};
+
+static const struct pci_device_id rh_unmaintained_pci_devices[] = {
+	{0}     /* Terminating entry */
+};
+#endif /* RHEL_MAJOR */
+
+#endif /* __RH_MESSAGES_H */

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2606
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux