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-next>] [day] [month] [year] [list]
Date:	Tue, 29 Aug 2006 21:52:43 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	linux-serial@...r.kernel.org, Andrew Morton <akpm@...l.org>,
	Pavel Machek <pavel@....cz>
Subject: [RFC][PATCH -mm] Make it possible to disable serial console suspend

Hack uart_suspend_port() and uart_resume_port() so that serial console ports
are not suspended if CONFIG_DISABLE_CONSOLE_SUSPEND is set.

This makes it possible to debug the suspend and resume routines of all device
drivers as well as the lowest-level swsusp code with the help of the serial
console.

Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
 drivers/serial/serial_core.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

Index: linux-2.6.18-rc4-mm3/drivers/serial/serial_core.c
===================================================================
--- linux-2.6.18-rc4-mm3.orig/drivers/serial/serial_core.c
+++ linux-2.6.18-rc4-mm3/drivers/serial/serial_core.c
@@ -1930,6 +1930,13 @@ int uart_suspend_port(struct uart_driver
 
 	mutex_lock(&state->mutex);
 
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+	if (uart_console(port)) {
+		mutex_unlock(&state->mutex);
+		return 0;
+	}
+#endif
+
 	if (state->info && state->info->flags & UIF_INITIALIZED) {
 		const struct uart_ops *ops = port->ops;
 
@@ -1968,6 +1975,13 @@ int uart_resume_port(struct uart_driver 
 
 	mutex_lock(&state->mutex);
 
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+	if (uart_console(port)) {
+		mutex_unlock(&state->mutex);
+		return 0;
+	}
+#endif
+
 	uart_change_pm(state, 0);
 
 	/*
-
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