Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires
-
Upload
anne-nicolas -
Category
Technology
-
view
170 -
download
0
Transcript of Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires
![Page 1: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/1.jpg)
What's inside the input stack?🐁
Kernel Recipes 2017
![Page 2: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/2.jpg)
About me:
Benjamin Tissoires (irc: bentiss) • Software engineer at Red Hat • kernel hid-multitouch maintainer, hid core co-maintainer • also gives bad advice for the upper input stack
![Page 3: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/3.jpg)
About the other guy:
Peter Hutterer (irc: whot) • Software engineer at Red Hat • libinput maintainer • Maintainer of the X.Org input stack, and evdev, synaptics, ... drivers • (99% of the time, 'we' means him and I)
![Page 4: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/4.jpg)
Isn't it working already?
![Page 5: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/5.jpg)
![Page 6: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/6.jpg)
Problem is:hardware makers can be creative
![Page 7: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/7.jpg)
![Page 8: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/8.jpg)
![Page 9: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/9.jpg)
And usage is changing
![Page 10: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/10.jpg)
![Page 11: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/11.jpg)
Outline: • Introduction • Input architecture • Talking about a bunch of devices • A little bit about security
![Page 12: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/12.jpg)
Everything you never wanted toknow about 'how input works'
![Page 13: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/13.jpg)
Components: • Kernel • libinput • "Wayland" or Xorg • toolkit • application
![Page 14: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/14.jpg)
Kernel: • knows about protocols (HID, RMI4, ...) • knows about transport layer (USB, PS/2, SMBus, I2C, etc...) • talks evdev
![Page 15: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/15.jpg)
Libinput: • because input is "easy" • relies on libevdev • does fancy things like gestures • has a global view of the input devices
![Page 16: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/16.jpg)
Compositor (or Xorg): • loads libinput • pass incoming events to the right client
![Page 17: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/17.jpg)
Toolkits: • relies on [see previous slides] • does fancy things like gestures too
![Page 18: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/18.jpg)
Applications: • do something useful (hopefully)
![Page 19: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/19.jpg)
The good, the bad and the ugly(of input devices)
![Page 20: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/20.jpg)
Keyboards
![Page 21: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/21.jpg)
Page left blank
![Page 22: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/22.jpg)
Actually no...the Caps Lock LED in a TTY isbroken since UTF-8 support inthe kernel
![Page 23: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/23.jpg)
Actually no...the Caps Lock LED in a TTY isbroken since UTF-8 support inthe kernel
pro tip: add /etc/udev/rules.d/99-kbd.rulesACTION=="add", \ SUBSYSTEM=="leds", \ ENV{DEVPATH}=="*/input*::capslock", \ ATTR{trigger}="kbd-ctrlllock"
![Page 24: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/24.jpg)
Mice
![Page 25: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/25.jpg)
(for the kernel)
Not much to add...
.
![Page 26: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/26.jpg)
(for the kernel)
Not much to add...
except libratbag
![Page 27: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/27.jpg)
libratbag:A thing to configure gaming mice
• fun project to hack on • allows for reverse engineering without the pain of breaking the kernel • supports many gaming devices: Logitech, Roccat, G-Skill, Razer (in progress)
![Page 28: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/28.jpg)
Touchpads
![Page 29: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/29.jpg)
Most are still using PS/2
![Page 30: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/30.jpg)
story time: T440
![Page 31: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/31.jpg)
story time: T440
![Page 32: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/32.jpg)
story time: T450
![Page 33: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/33.jpg)
story time: T450
![Page 34: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/34.jpg)
A little bit about security(with a red background)
![Page 35: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/35.jpg)
CVEs?: • yes, but only a few • one notable was regarding the ChromeBook injecting HID event through a web application
![Page 36: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/36.jpg)
MouseJack
![Page 37: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/37.jpg)
MouseJack:
Congrats, your mouse is IoT ready!
http://www.mousejack.com/
.
![Page 38: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/38.jpg)
MouseJack:
Congrats, your mouse is IoT ready!
http://www.mousejack.com/
You have to update it
![Page 39: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/39.jpg)
Summary: • Input architecture • some devices still need some care • security is also involved
![Page 40: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/40.jpg)
Credits • PS/2 keyboard: CC BY Matthijs Kooijman • G600 Gaming Mouse: all rights reserved, Logitech • Lenovo X1 Carbon: CC BY-SA 2.0 Stannate • Lenovo Yoga Tablet 3 Pro: all rights reserved, Lenovo
![Page 41: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/41.jpg)
Thanks!
benjamin.tissoires@(gmail|redhat).comIRC: bentiss @freenode @gimpnet
![Page 42: Kernel Recipes 2017 - What's inside the input stack? - Benjamain Tissoires](https://reader031.fdocuments.net/reader031/viewer/2022022415/5a64e07b7f8b9a88148b5c35/html5/thumbnails/42.jpg)
Summary: • Input architecture • some devices still need some care • security is also involved