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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Jan 2010 08:59:27 -0600
From:	Jason Wessel <jason.wessel@...driver.com>
To:	linux-kernel@...r.kernel.org
Cc:	kgdb-bugreport@...ts.sourceforge.net, mingo@...e.hu,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Jason Wessel <jason.wessel@...driver.com>
Subject: [PATCH 31/40] kgdb: add ops arg to kgdb console active & restore hooks

From: Jesse Barnes <jbarnes@...tuousgeek.org>

This allows callers to store the ops structure in a parent device structure.

Signed-off-by: Jesse Barnes <jbarnes@...tuousgeek.org>
Signed-off-by: Jason Wessel <jason.wessel@...driver.com>
---
 drivers/serial/kgdboc.c |    4 ++--
 include/linux/kgdb.h    |   17 ++++++++++++++---
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
index 34b0306..93b18f9 100644
--- a/drivers/serial/kgdboc.c
+++ b/drivers/serial/kgdboc.c
@@ -208,7 +208,7 @@ static void kgdboc_pre_exp_handler(void)
 {
 	if (kgdboc_use_kms && dbg_kms_console_core &&
 	    dbg_kms_console_core->activate_console)
-		if (dbg_kms_console_core->activate_console())
+		if (dbg_kms_console_core->activate_console(dbg_kms_console_core))
 			printk(KERN_ERR "kgdboc: kernel mode switch error\n");
 
 	/* Increment the module count when the debugger is active */
@@ -223,7 +223,7 @@ static void kgdboc_post_exp_handler(void)
 		module_put(THIS_MODULE);
 	if (kgdboc_use_kms && dbg_kms_console_core &&
 	    dbg_kms_console_core->restore_console)
-		if (dbg_kms_console_core->restore_console())
+		if (dbg_kms_console_core->restore_console(dbg_kms_console_core))
 			printk(KERN_ERR "kgdboc: graphics restore failed\n");
 #ifdef CONFIG_KDB_KEYBOARD
 	/* If using the kdb keyboard driver release all the keys. */
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 35ad419..68fa243 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -289,11 +289,22 @@ extern void __init early_kgdboc_init(void);
 
 /* Common to all that include kgdb.h */
 struct dbg_kms_console_ops {
-	int (*activate_console) (void);
-	int (*restore_console) (void);
+	int (*activate_console) (struct dbg_kms_console_ops *ops);
+	int (*restore_console) (struct dbg_kms_console_ops *ops);
 };
 
 #ifdef CONFIG_KGDB
 extern struct dbg_kms_console_ops *dbg_kms_console_core;
-#endif
+extern int dbg_kms_console_ops_register(struct dbg_kms_console_ops *ops);
+extern int dbg_kms_console_ops_unregister(struct dbg_kms_console_ops *ops);
+#else /* ! CONFIG_KGDB */
+static inline int dbg_kms_console_ops_register(struct dbg_kms_console_ops *ops)
+{
+       return 0;
+}
+static inline int dbg_kms_console_ops_unregister(struct dbg_kms_console_ops *ops)
+{
+       return 0;
+}
+#endif /* ! CONFIG_KGDB */
 #endif /* _KGDB_H_ */
-- 
1.6.3.1.9.g95405b

--
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