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-next>] [day] [month] [year] [list]
Message-Id: <20101006130436.45d8a96a.sfr@canb.auug.org.au>
Date:	Wed, 6 Oct 2010 13:04:36 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Jason Wessel <jason.wessel@...driver.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: linux-next: manual merge of the kgdb tree with the input tree

Hi Jason,

Today's linux-next merge of the kgdb tree got a conflict in
drivers/char/sysrq.c between commit
1966cb225c6f9040ca163802cbd052c393d4448f ("Input: sysrq - add locking to
sysrq_filter()") from the input tree and commit
02307772717c91a108aca2e999bbc586a85d06a2 ("sysrq,keyboard: properly deal
with alt-sysrq in sysrq input filter") from the kgdb tree.

Just context changes.  I fixed it up (see below) and can carry the fax as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/char/sysrq.c
index f0ad694,9b97aad..0000000
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@@ -566,7 -566,57 +566,58 @@@ static const unsigned char sysrq_xlate[
  static bool sysrq_down;
  static int sysrq_alt_use;
  static int sysrq_alt;
 +static DEFINE_SPINLOCK(sysrq_event_lock);
+ static bool sysrq_kbd_triggered;
+ 
+ /*
+  * This function was a copy of input_pass_event but modified to allow
+  * by-passing a specific filter, to allow for injected events without
+  * filter recursion.
+  */
+ static void input_pass_event_ignore(struct input_dev *dev,
+ 			     unsigned int type, unsigned int code, int value,
+ 			     struct input_handle *ignore_handle)
+ {
+ 	struct input_handler *handler;
+ 	struct input_handle *handle;
+ 
+ 	rcu_read_lock();
+ 
+ 	handle = rcu_dereference(dev->grab);
+ 	if (handle)
+ 		handle->handler->event(handle, type, code, value);
+ 	else {
+ 		bool filtered = false;
+ 
+ 		list_for_each_entry_rcu(handle, &dev->h_list, d_node) {
+ 			if (!handle->open || handle == ignore_handle)
+ 				continue;
+ 			handler = handle->handler;
+ 			if (!handler->filter) {
+ 				if (filtered)
+ 					break;
+ 
+ 				handler->event(handle, type, code, value);
+ 
+ 			} else if (handler->filter(handle, type, code, value))
+ 				filtered = true;
+ 		}
+ 	}
+ 
+ 	rcu_read_unlock();
+ }
+ 
+ /*
+  * Pass along alt-print_screen, if there was no sysrq processing by
+  * sending a key press down and then passing the key up event.
+  */
+ static void simulate_alt_sysrq(struct input_handle *handle)
+ {
+ 	input_pass_event_ignore(handle->dev, EV_KEY, KEY_SYSRQ, 1, handle);
+ 	input_pass_event_ignore(handle->dev, EV_SYN, SYN_REPORT, 0, handle);
+ 	input_pass_event_ignore(handle->dev, EV_KEY, KEY_SYSRQ, 0, handle);
+ 	input_pass_event_ignore(handle->dev, EV_SYN, SYN_REPORT, 0, handle);
+ }
  
  static bool sysrq_filter(struct input_handle *handle, unsigned int type,
  		         unsigned int code, int value)
--
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