History log of /freebsd-12.1/sys/dev/evdev/evdev.c (Results 1 – 20 of 20)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# 4a919ad3 10-Mar-2019 Vladimir Kondratyev <[email protected]>

MFC r344494,r344495:

evdev: export event device properties through sysctl interface

A big security advantage of Wayland is not allowing applications to read
input devices all the time. Having /dev/

MFC r344494,r344495:

evdev: export event device properties through sysctl interface

A big security advantage of Wayland is not allowing applications to read
input devices all the time. Having /dev/input/* accessible to the user
account subverts this advantage.

libudev-devd was opening the evdev devices to detect their types (mouse,
keyboard, touchpad, etc). This don't work if /dev/input/* is inaccessible.
With the kernel exposing this information as sysctls (kern.evdev.input.*),
we can work w/o /dev/input/* access, preserving the Wayland security model.

Submitted by: Greg V <[email protected]>
Reviewed by: wulf, imp
Differential Revision: https://reviews.freebsd.org/D18694

show more ...


Revision tags: release/12.0.0
# 04a7a36d 17-Nov-2018 Vladimir Kondratyev <[email protected]>

MFC r339823:

evdev: Use console lock as evdev lock for all supported keyboard drivers.

Now evdev part of keyboard drivers does not take any locks if corresponding
input/eventN device node is not op

MFC r339823:

evdev: Use console lock as evdev lock for all supported keyboard drivers.

Now evdev part of keyboard drivers does not take any locks if corresponding
input/eventN device node is not opened by userland consumers.

Do not assert console lock inside evdev to handle the cases when keyboard
driver is called from some special single-threaded context like shutdown
thread.

MFC r339824:

evdev: disable evdev if it is invoked from KDB or panic context

This allow to prevent deadlock on entering KDB if one of evdev locks is
already taken by userspace process.

Also this change discards all but LED console events produced by KDB as
unrelated to userspace.

show more ...


# 911aed94 13-Aug-2018 Vladimir Kondratyev <[email protected]>

evdev: remove soft context from evdev methods parameter list.

Now softc should be retrieved from struct edvev * pointer
with evdev_get_softc() helper.

wmt(4) is a sample of driver that support both

evdev: remove soft context from evdev methods parameter list.

Now softc should be retrieved from struct edvev * pointer
with evdev_get_softc() helper.

wmt(4) is a sample of driver that support both KPI.

Reviewed by: hselasky, gonzo
Differential Revision: https://reviews.freebsd.org/D16614

show more ...


Revision tags: release/11.2.0
# 303dbb85 20-Nov-2017 Vladimir Kondratyev <[email protected]>

evdev: Export EVDEV_SUPPORT kernel option through feature facility

Suggested by: netchild
Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 1 week


# 37ff3345 01-Nov-2017 Vladimir Kondratyev <[email protected]>

evdev: Do not start/stop softrepeat callout if no clients attached

Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12676


# c6e80942 01-Nov-2017 Vladimir Kondratyev <[email protected]>

evdev: Disable value normalization and state filtering for SND events.

Some events can take sound pitch as a value so can not be represented
as binary on/off events. Tracking for on/off state is lef

evdev: Disable value normalization and state filtering for SND events.

Some events can take sound pitch as a value so can not be represented
as binary on/off events. Tracking for on/off state is left in place
as it is a part of the evdev API.

Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12676

show more ...


# f3f80694 01-Nov-2017 Vladimir Kondratyev <[email protected]>

evdev: Take driver's lock in cdev write handler if necessary

Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12676


# 233e1074 01-Nov-2017 Vladimir Kondratyev <[email protected]>

evdev: Hide "kern.evdev.rcpt_mask" sysctl if kernel is compiled
w/o EVDEV_SUPPORT as it's value has no meaning in this case.

Now presence of this sysctl can be used for discovery if evdev support
fo

evdev: Hide "kern.evdev.rcpt_mask" sysctl if kernel is compiled
w/o EVDEV_SUPPORT as it's value has no meaning in this case.

Now presence of this sysctl can be used for discovery if evdev support
for hybrid devices is compiled into kernel or not.
Hide "kern.evdev.sysmouse_t_axis" sysctl for the same reason.

Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12676

show more ...


Revision tags: release/10.4.0
# e6502802 23-Jul-2017 Vladimir Kondratyev <[email protected]>

Change my email address to [email protected] in copyright headers.

Approved by: gonzo (mentor)
MFC after: 2 weeks


# 4c0a4665 23-Jul-2017 Vladimir Kondratyev <[email protected]>

evdev: Macroize common locking sequences

Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks


# ea2e26b1 23-Jul-2017 Vladimir Kondratyev <[email protected]>

evdev: style(9), sort headers alphabetically

Pointed out by: bde
Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks


Revision tags: release/11.1.0
# 4af79d4f 10-Dec-2016 Oleksandr Tymoshenko <[email protected]>

[evdev] Adds evdev support to sysmouse(4) driver

For horizontal (T-axis) wheel reporting which is not supported by
sysmouse protocol kern.evdev.sysmouse_t_axis sysctl is introduced.
It can take foll

[evdev] Adds evdev support to sysmouse(4) driver

For horizontal (T-axis) wheel reporting which is not supported by
sysmouse protocol kern.evdev.sysmouse_t_axis sysctl is introduced.
It can take following values:

0 - no T-axis events (default)
1 - T-axis events are originated in ums(4) driver.
2 - T-axis events are originated in psm(4) driver.

Submitted by: Vladimir Kondratiev <[email protected]>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8597

show more ...


# 73362d0e 22-Oct-2016 Oleksandr Tymoshenko <[email protected]>

EVDEV: Add shortcut functions for event types

Add wrappers around generic evdev_push_event for specific event types:
EV_KEY/EV_REL/EV_ABS etc...

Submitted by: Vladimir Kondratiev <[email protected]>


# c736a757 08-Oct-2016 Oleksandr Tymoshenko <[email protected]>

Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)

Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots
that has not been listed in current MT protocol type B report.

Slot is co

Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)

Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots
that has not been listed in current MT protocol type B report.

Slot is counted as listed if corresponding ABS_MT_SLOT event
has been sent regardless of other MT events.

Events are sent on SYN_REPORT event.

Submitted by: Vladimir Kondratiev <[email protected]>

show more ...


# bfbd1bb7 08-Oct-2016 Oleksandr Tymoshenko <[email protected]>

Allow using of driver's mutex instead internal one for evdev locking.

Add new API call: evdev_register_mtx which takes lock argument that
should be used instead of internal one for evdev locking. Us

Allow using of driver's mutex instead internal one for evdev locking.

Add new API call: evdev_register_mtx which takes lock argument that
should be used instead of internal one for evdev locking. Useful for
cases if evdev_push_event() is always called with driver's lock taken
and reduces amount of lock aquisitions. This allows to avoid LOR
between ev_open/ev_close invocations and evdev_push_event() Such LOR
can happen when ev_open/ev_close methods acquire driver lock and
evdev_push_event() is called with this lock taken.

Submitted by: Vladimir Kondratiev <[email protected]>

show more ...


# 5163e77f 03-Oct-2016 Oleksandr Tymoshenko <[email protected]>

const-ify struct evdev_methods

Submitted by: Vladimir Kondratiev <[email protected]>
Suggested by: hselasky


# a6b15a34 02-Oct-2016 Oleksandr Tymoshenko <[email protected]>

Modularize evdev

- Convert "options EVDEV" to "device evdev" and "device uinput", add
modules for both new devices. They are isolated subsystems and do not
require any compile-time changes t

Modularize evdev

- Convert "options EVDEV" to "device evdev" and "device uinput", add
modules for both new devices. They are isolated subsystems and do not
require any compile-time changes to general kernel subsytems
- For hybrid drivers that have evdev as an optional way to deliver input
events add option EVDEV_SUPPORT. Update all existing hybrid drivers
to use it instead of EVDEV
- Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION
is enough
- Add evdev module dependency to uinput

Submitted by: Vladimir Kondratiev <[email protected]>

show more ...


# fa26e8ed 30-Sep-2016 Oleksandr Tymoshenko <[email protected]>

Declare a module for evdev and add dependency to ukbd(4) and ums(4)

Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regar

Declare a module for evdev and add dependency to ukbd(4) and ums(4)

Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regardless of
"options EVDEV" in kernel config. So if people does not require evdev
functionality in hybrid drivers like ums and ukbd they can, for instance,
kldload evdev and utouchscreen to run FreeBSD in kiosk mode.

show more ...


Revision tags: release/11.0.1
# c3f2135c 23-Sep-2016 Oleksandr Tymoshenko <[email protected]>

Handle NULL argument in evdev_free

Add check for evdev argument of evdev_free being NULL. This is valid
value and should not cause crash. In this case evdev_free does nothing

Submitted by: Vladimir

Handle NULL argument in evdev_free

Add check for evdev argument of evdev_free being NULL. This is valid
value and should not cause crash. In this case evdev_free does nothing

Submitted by: Vladimir Kondratiev <[email protected]>

show more ...


Revision tags: release/11.0.0
# 2b3f6d66 11-Sep-2016 Oleksandr Tymoshenko <[email protected]>

Add evdev protocol implementation

evdev is a generic input event interface compatible with Linux
evdev API at ioctl level. It allows using unmodified (apart from
header name) input evdev drivers in

Add evdev protocol implementation

evdev is a generic input event interface compatible with Linux
evdev API at ioctl level. It allows using unmodified (apart from
header name) input evdev drivers in Xorg, Wayland, Qt.

This commit has only generic kernel API. evdev support for individual
hardware drivers like ukbd, ums, atkbd, etc. will be committed later.

Project was started by Jakub Klama as part of GSoC 2014. Jakub's
evdev implementation was later used as a base, updated and finished
by Vladimir Kondratiev.

Submitted by: Vladimir Kondratiev <[email protected]>
Reviewed by: adrian, hans
Differential Revision: https://reviews.freebsd.org/D6998

show more ...