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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348163523-2062-1-git-send-email-dh.herrmann@googlemail.com>
Date:	Thu, 20 Sep 2012 19:52:00 +0200
From:	David Herrmann <dh.herrmann@...glemail.com>
To:	linux-input@...r.kernel.org
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-kernel@...r.kernel.org,
	Bernie Thompson <bernie@...gable.com>,
	David Herrmann <dh.herrmann@...glemail.com>
Subject: [PATCH v2 0/3] input: Dynamic Minor Numbers

Hi

This is version 2 of the Dynamic Minor Numbers support for input devices.
Version 1 can be found here:
  http://thread.gmane.org/gmane.linux.kernel.input/26842

For historical reasons, each input-handler (like evdev, joydev etc.) gets 32
minor numbers assigned statically. That means, if we have more than 32 input
devices, then there will not be any /dev/input/eventX device that user-space can
use to access the device.
While 32 devices were enough for a long time, multi-seat machines currently
cannot create more than 8 seats due to this restriction (assuming 3 devices per
seat plus some static devices).

This patchset allows input-handlers to allocate dynamic minor numbers if they
run out of static numbers. Patch #1 adds the infrastructure to the input core,
patch #2 makes sure we allow enough devices so we actually have room for dynamic
minor numbers and patch #3 converts evdev to use it.

Unused static minors numbers are never used for the dynamic minor numbers pool.
So existing user-space does not break. But old user-space (not using udev) will
not be able to use the new devices.
Existing user-space with udev support will be able to use it, but the xserver
currently crashes when more than 40 devices are added (which is unrelated to
this patch).

If you want to test it, you can use this tool which creates dummy input devices
via uinput:
  https://gist.github.com/3756232

Example output for 'ls -la /dev/input':
https://gist.github.com/3755663

I fixed minor coding-style issues since version 1 and a NULL-dereference in
input_minor_alloc().

Regards
David

David Herrmann (3):
  input: add dynamic-minor allocation helpers
  input: increase INPUT_DEVICES to 512 to allow dynamic minors
  input: evdev: use dynamic-minors if running out of static minors

 drivers/input/evdev.c |  95 +++++++++++++++-------------
 drivers/input/input.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/input.h |   5 ++
 3 files changed, 222 insertions(+), 45 deletions(-)

-- 
1.7.12

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