Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: remove evbug driver

I've never heard of anyone having used this driver for debugging at least
in over past decade or so. Since we have tools like evtest, this driver
seems to be rather superficial.

Also, it apparently causes confusion among people who accidentaly enable
CONFIG_INPUT_EVBUG and are annoyed/confused by their kernel log being
spammed by a lot of useless data.

Let's just remove it.

Signed-off-by: Jiri Kosina <jkosina@suse.com>
Link: https://lore.kernel.org/r/8n377s5p-3r9n-ro38-3r2o-p536745552qo@xreary.bet
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jiri Kosina and committed by
Dmitry Torokhov
e571f988 6d4a0f4e

-115
-14
drivers/input/Kconfig
··· 152 152 To compile this driver as a module, choose M here: the 153 153 module will be called evdev. 154 154 155 - config INPUT_EVBUG 156 - tristate "Event debugging" 157 - help 158 - Say Y here if you have a problem with the input subsystem and 159 - want all events (keypresses, mouse movements), to be output to 160 - the system log. While this is useful for debugging, it's also 161 - a security threat - your keypresses include your passwords, of 162 - course. 163 - 164 - If unsure, say N. 165 - 166 - To compile this driver as a module, choose M here: the 167 - module will be called evbug. 168 - 169 155 config INPUT_KUNIT_TEST 170 156 tristate "KUnit tests for Input" if !KUNIT_ALL_TESTS 171 157 depends on INPUT && KUNIT
-1
drivers/input/Makefile
··· 18 18 obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o 19 19 obj-$(CONFIG_INPUT_JOYDEV) += joydev.o 20 20 obj-$(CONFIG_INPUT_EVDEV) += evdev.o 21 - obj-$(CONFIG_INPUT_EVBUG) += evbug.o 22 21 23 22 obj-$(CONFIG_INPUT_KEYBOARD) += keyboard/ 24 23 obj-$(CONFIG_INPUT_MOUSE) += mouse/
-100
drivers/input/evbug.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-or-later 2 - /* 3 - * Copyright (c) 1999-2001 Vojtech Pavlik 4 - */ 5 - 6 - /* 7 - * Input driver event debug module - dumps all events into syslog 8 - */ 9 - 10 - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 11 - 12 - #include <linux/slab.h> 13 - #include <linux/module.h> 14 - #include <linux/input.h> 15 - #include <linux/init.h> 16 - #include <linux/device.h> 17 - 18 - MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); 19 - MODULE_DESCRIPTION("Input driver event debug module"); 20 - MODULE_LICENSE("GPL"); 21 - 22 - static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) 23 - { 24 - printk(KERN_DEBUG pr_fmt("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n"), 25 - dev_name(&handle->dev->dev), type, code, value); 26 - } 27 - 28 - static int evbug_connect(struct input_handler *handler, struct input_dev *dev, 29 - const struct input_device_id *id) 30 - { 31 - struct input_handle *handle; 32 - int error; 33 - 34 - handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL); 35 - if (!handle) 36 - return -ENOMEM; 37 - 38 - handle->dev = dev; 39 - handle->handler = handler; 40 - handle->name = "evbug"; 41 - 42 - error = input_register_handle(handle); 43 - if (error) 44 - goto err_free_handle; 45 - 46 - error = input_open_device(handle); 47 - if (error) 48 - goto err_unregister_handle; 49 - 50 - printk(KERN_DEBUG pr_fmt("Connected device: %s (%s at %s)\n"), 51 - dev_name(&dev->dev), 52 - dev->name ?: "unknown", 53 - dev->phys ?: "unknown"); 54 - 55 - return 0; 56 - 57 - err_unregister_handle: 58 - input_unregister_handle(handle); 59 - err_free_handle: 60 - kfree(handle); 61 - return error; 62 - } 63 - 64 - static void evbug_disconnect(struct input_handle *handle) 65 - { 66 - printk(KERN_DEBUG pr_fmt("Disconnected device: %s\n"), 67 - dev_name(&handle->dev->dev)); 68 - 69 - input_close_device(handle); 70 - input_unregister_handle(handle); 71 - kfree(handle); 72 - } 73 - 74 - static const struct input_device_id evbug_ids[] = { 75 - { .driver_info = 1 }, /* Matches all devices */ 76 - { }, /* Terminating zero entry */ 77 - }; 78 - 79 - MODULE_DEVICE_TABLE(input, evbug_ids); 80 - 81 - static struct input_handler evbug_handler = { 82 - .event = evbug_event, 83 - .connect = evbug_connect, 84 - .disconnect = evbug_disconnect, 85 - .name = "evbug", 86 - .id_table = evbug_ids, 87 - }; 88 - 89 - static int __init evbug_init(void) 90 - { 91 - return input_register_handler(&evbug_handler); 92 - } 93 - 94 - static void __exit evbug_exit(void) 95 - { 96 - input_unregister_handler(&evbug_handler); 97 - } 98 - 99 - module_init(evbug_init); 100 - module_exit(evbug_exit);