remarkable-linux/net
Henrique de Moraes Holschuh 78236571a5 rfkill: rate-limit rfkill-input workqueue usage (v3)
Limit the number of "expensive" rfkill workqueue operations per second, in
order to not hog system resources too much when faced with a rogue source
of rfkill input events.

The old rfkill-input code (before it was refactored) had such a limit in
place.  It used to drop new events that were past the rate limit.  This
behaviour was not implemented as an anti-DoS measure, but rather as an
attempt to work around deficiencies in input device drivers which would
issue multiple KEY_FOO events too soon for a given key FOO (i.e. ones that
do not implement mechanical debouncing properly).

However, we can't really expect such issues to be worked around by every
input handler out there, and also by every userspace client of input
devices.  It is the input device driver's responsability to do debouncing
instead of spamming the input layer with bogus events.

The new limiter code is focused only on anti-DoS behaviour, and tries to
not lose events (instead, it coalesces them when possible).

The transmitters are updated once every 200ms, maximum.  Care is taken not
to delay a request to _enter_ rfkill transmitter Emergency Power Off (EPO)
mode.

If mistriggered (e.g. by a jiffies counter wrap), the code delays processing
*once* by 200ms.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-31 19:00:10 -04:00
..
9p 9p: fix sparse warnings 2008-10-22 18:54:47 -05:00
802 net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
8021q vlan: propogate ethtool speed values 2008-10-28 23:02:34 -07:00
appletalk net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
atm net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
ax25 ax25: Quick fix for making sure unaccepted sockets get destroyed. 2008-10-06 12:53:50 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-17 08:58:52 -07:00
bridge net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
can net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely) 2008-10-16 15:24:51 -07:00
core Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-31 00:17:34 -07:00
dccp net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
decnet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-17 08:58:52 -07:00
dsa dsa: fix compile bug on s390 2008-10-13 18:58:48 -07:00
econet netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ethernet dsa: add support for Trailer tagging format 2008-10-08 17:24:16 -07:00
ieee80211 net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
ipv4 net: replace NIPQUAD() in net/ipv4/ net/ipv6/ 2008-10-31 00:53:57 -07:00
ipv6 net: replace NIPQUAD() in net/ipv4/ net/ipv6/ 2008-10-31 00:53:57 -07:00
ipx netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
irda net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
iucv iucv: Fix mismerge again. 2008-09-30 03:03:35 -07:00
key af_key: fix SADB_X_SPDDELETE response 2008-10-10 14:07:03 -07:00
lapb
llc net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
mac80211 mac80211: introduce hw config change flags 2008-10-31 19:00:07 -04:00
netfilter net: replace NIPQUAD() in net/netfilter/ 2008-10-31 00:54:29 -07:00
netlabel net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
netlink netlink: constify struct nlattr * arg to parsing functions 2008-10-28 11:59:11 -07:00
netrom netrom: Fix sock_orphan() use in nr_release 2008-10-06 12:54:57 -07:00
packet net: convert BUG_TRAP to generic WARN_ON 2008-07-25 21:43:18 -07:00
phonet Phonet: do not reply to indication reset packets 2008-10-26 23:07:25 -07:00
rfkill rfkill: rate-limit rfkill-input workqueue usage (v3) 2008-10-31 19:00:10 -04:00
rose netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. 2008-07-22 14:16:42 -07:00
rxrpc net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
sched pkt_sched: Add peek emulation for non-work-conserving qdiscs. 2008-10-31 00:47:01 -07:00
sctp net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
sunrpc net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
tipc net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
unix [PATCH] assorted path_lookup() -> kern_path() conversions 2008-10-23 05:12:52 -04:00
wanrouter wanmain.c doesn't need syncppp.h 2008-07-23 23:00:36 +02:00
wireless wireless: fix regression caused by regulatory config option 2008-10-26 10:38:52 -07:00
x25 netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
xfrm net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
compat.c flag parameters: paccept 2008-07-24 10:47:27 -07:00
Kconfig netns: Coexist with the sysfs limitations v2 2008-10-27 17:51:47 -07:00
Makefile net: Distributed Switch Architecture protocol support 2008-10-08 17:15:19 -07:00
nonet.c
socket.c net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely) 2008-10-16 15:24:51 -07:00
sysctl_net.c missing bits of net-namespace / sysctl 2008-07-27 09:45:34 -07:00
TUNABLE