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>] [day] [month] [year] [list]
Message-ID: <479FBA93.5080904@web.de>
Date:	Wed, 30 Jan 2008 00:45:23 +0100
From:	Jan Kiszka <jan.kiszka@....de>
To:	Jason Wessel <jason.wessel@...driver.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kgdb-bugreport@...ts.sourceforge.net
Subject: [PATCH 3/5] KGDB-8250: respect early parameters

This patch makes sure that the config string passed via "kgdb8250="
takes precedence over any built-time configuration.

Signed-off-by: Jan Kiszka <jan.kiszka@....de>

---
 drivers/serial/8250_kgdb.c |   29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

Index: b/drivers/serial/8250_kgdb.c
===================================================================
--- a/drivers/serial/8250_kgdb.c
+++ b/drivers/serial/8250_kgdb.c
@@ -39,7 +39,9 @@ module_param_string(kgdb8250, config, 25
 MODULE_PARM_DESC(kgdb8250,
 		 " kgdb8250=<io or mmio>,<address>,<baud rate>,<irq>\n");
 static struct kgdb_io local_kgdb_io_ops;
-#endif				/* CONFIG_KGDB_8250_MODULE */
+#else  /* !CONFIG_KGDB_8250_MODULE */
+static int params_evaluated;
+#endif /* !CONFIG_KGDB_8250_MODULE */

 /* Speed of the UART. */
 static int kgdb8250_baud;
@@ -320,16 +322,17 @@ static __init int kgdb_init_io(void)
 		       "kgdb8250=<line #>,<baud rate>\n");
 		return -EINVAL;
 	}
-#elif defined(CONFIG_KGDB_SIMPLE_SERIAL)
-	kgdb8250_baud = CONFIG_KGDB_BAUDRATE;
-
-	/* Setup our pointer to the serial port now. */
-	current_port = &kgdb8250_ports[CONFIG_KGDB_PORT_NUM];
-#else
-	if (kgdb8250_opt(CONFIG_KGDB_8250_CONF_STRING))
-		return -EINVAL;
-#endif
-
+#else  /* !CONFIG_KGDB_8250_MODULE */
+	if (!params_evaluated) {
+#ifdef CONFIG_KGDB_SIMPLE_SERIAL
+		kgdb8250_baud = CONFIG_KGDB_BAUDRATE;
+		current_port = &kgdb8250_ports[CONFIG_KGDB_PORT_NUM];
+#else /* !CONFIG_KGDB_SIMPLE_SERIAL */
+		if (kgdb8250_opt(CONFIG_KGDB_8250_CONF_STRING))
+			return -EINVAL;
+#endif /* !CONFIG_KGDB_SIMPLE_SERIAL */
+	}
+#endif /* !CONFIG_KGDB_8250_MODULE */

 	/* Internal driver setup. */
 	switch (current_port->iotype) {
@@ -512,7 +515,9 @@ finish:
 #ifdef CONFIG_KGDB_SIMPLE_SERIAL
 	should_copy_rs_table = 0;
 #endif
-
+#ifdef CONFIG_KGDB_8250
+	params_evaluated = 1;
+#endif
 	return 0;

 errout:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ