Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Dmitry Torokhov
On Thu, Dec 19, 2013 at 10:25:42AM +1000, Peter Hutterer wrote: > On Wed, Dec 18, 2013 at 04:05:37PM -0800, Dmitry Torokhov wrote: > > On Thu, Dec 19, 2013 at 09:55:04AM +1000, Peter Hutterer wrote: > > > On Wed, Dec 18, 2013 at 03:48:37PM -0800, Dmitry Torokhov wrote: > > > > On Thursday, December

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Peter Hutterer
On Wed, Dec 18, 2013 at 04:05:37PM -0800, Dmitry Torokhov wrote: > On Thu, Dec 19, 2013 at 09:55:04AM +1000, Peter Hutterer wrote: > > On Wed, Dec 18, 2013 at 03:48:37PM -0800, Dmitry Torokhov wrote: > > > On Thursday, December 19, 2013 09:40:09 AM Peter Hutterer wrote: > > > > > + memset(&abs,

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Dmitry Torokhov
On Thu, Dec 19, 2013 at 09:55:04AM +1000, Peter Hutterer wrote: > On Wed, Dec 18, 2013 at 03:48:37PM -0800, Dmitry Torokhov wrote: > > On Thursday, December 19, 2013 09:40:09 AM Peter Hutterer wrote: > > > > + memset(&abs, 0, sizeof(abs)); > > > > + for (i = valid_cnt; i < cnt; ++i) > > > >

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Peter Hutterer
On Wed, Dec 18, 2013 at 03:48:37PM -0800, Dmitry Torokhov wrote: > On Thursday, December 19, 2013 09:40:09 AM Peter Hutterer wrote: > > > + memset(&abs, 0, sizeof(abs)); > > > + for (i = valid_cnt; i < cnt; ++i) > > > + if (copy_to_user(&pinfo->info[i], &abs, sizeof(abs))) > > >

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Dmitry Torokhov
On Thursday, December 19, 2013 09:40:09 AM Peter Hutterer wrote: > > + memset(&abs, 0, sizeof(abs)); > > + for (i = valid_cnt; i < cnt; ++i) > > + if (copy_to_user(&pinfo->info[i], &abs, sizeof(abs))) > > + return -EFAULT; > > + > > + return 0; > > why d

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Peter Hutterer
On Tue, Dec 17, 2013 at 04:48:52PM +0100, David Herrmann wrote: > As we painfully noticed during the 3.12 merge-window our > EVIOCGABS/EVIOCSABS API is limited to ABS_MAX<=0x3f. We tried several > hacks to work around it but if we ever decide to increase ABS_MAX, the > EVIOCSABS ioctl ABI might ove

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Antonio Ospite
On Wed, 18 Dec 2013 15:44:48 +0100 David Herrmann wrote: > Hi > > On Wed, Dec 18, 2013 at 3:27 PM, Antonio Ospite > wrote: > > Hi David, > > > > thanks for the update. > > > > On Tue, 17 Dec 2013 16:48:52 +0100 > > David Herrmann wrote: > > > >> As we painfully noticed during the 3.12 merge-wi

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Dmitry Torokhov
On Wed, Dec 18, 2013 at 03:44:48PM +0100, David Herrmann wrote: > >> > >> /* > >> + * Due to API restrictions the legacy evdev API only supports ABS values > >> up to > >> + * ABS_MAX/CNT. Use the extended *ABS2 ioctls to operate on any ABS > >> values in > >> + * between ABS_MAX and ABS_MAX2. >

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Dmitry Torokhov
On Tue, Dec 17, 2013 at 04:48:52PM +0100, David Herrmann wrote: > As we painfully noticed during the 3.12 merge-window our > EVIOCGABS/EVIOCSABS API is limited to ABS_MAX<=0x3f. We tried several > hacks to work around it but if we ever decide to increase ABS_MAX, the > EVIOCSABS ioctl ABI might ove

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread David Herrmann
Hi On Wed, Dec 18, 2013 at 3:27 PM, Antonio Ospite wrote: > Hi David, > > thanks for the update. > > On Tue, 17 Dec 2013 16:48:52 +0100 > David Herrmann wrote: > >> As we painfully noticed during the 3.12 merge-window our >> EVIOCGABS/EVIOCSABS API is limited to ABS_MAX<=0x3f. We tried several >

Re: [PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-18 Thread Antonio Ospite
Hi David, thanks for the update. On Tue, 17 Dec 2013 16:48:52 +0100 David Herrmann wrote: > As we painfully noticed during the 3.12 merge-window our > EVIOCGABS/EVIOCSABS API is limited to ABS_MAX<=0x3f. We tried several > hacks to work around it but if we ever decide to increase ABS_MAX, the >

[PATCH 2/4] Input: introduce ABS_MAX2/CNT2 and friends

2013-12-17 Thread David Herrmann
As we painfully noticed during the 3.12 merge-window our EVIOCGABS/EVIOCSABS API is limited to ABS_MAX<=0x3f. We tried several hacks to work around it but if we ever decide to increase ABS_MAX, the EVIOCSABS ioctl ABI might overflow into the next byte causing horrible misinterpretations in the kern