Re: [PATCH] Input :Added Check for EV_ABS event params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 21-04-15 23:56, Peter Hutterer wrote:
On Tue, Apr 21, 2015 at 11:29:16AM -0700, Dmitry Torokhov wrote:
Hi Anshul,

On Tue, Apr 21, 2015 at 11:19:52AM -0700, Anshul Garg wrote:
From: Anshul Garg <aksgarg1989@xxxxxxxxx>

while handling EV_ABS event in input_handle_abs_event
function added check for out of range event value from
input driver. As input driver sets the ABS params at
registration time so input core should ignore events out
of the range set by the input driver.

No, I do not think we want to do that, at least not unconditionally,
especially since it is perfectly allowed to use 0 as min/max, which
means that exact min and max are not defined. Historically min and max
were provided to the userspace as a guidance and it was up to userspace
to decide what to do with values outside of the limits.

for the archives:
X requires us to drop coordinates outside the given range, at least the
ones we forward to the clients from absolute devices. We have used
out-of-bounds variables within the synaptics driver in the past though.

Also for the record, for touchpad devices min-max typically give the edges
not the absolute min / max values of the sensor. In some cases there may also
be margins given in the min/max values coming from the touchpad-firmware which
already take an edge-scrolling area into account. So with touchpads getting
values outside of the min/max range is sometimes something which not only
may happen, but actually is expected to happen.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux