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-prev] [day] [month] [year] [list]
Date:	Tue, 29 Dec 2015 23:32:25 +0530
From:	Aniroop Mathur <aniroop.mathur@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Aniroop Mathur <a.mathur@...sung.com>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Input: evdev: avoid storing newest SYN_REPORT when
 dropping all events

Hello Mr. Torokhov,

On Tue, Dec 29, 2015 at 5:11 AM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> Hi Aniroop,
>
> On Thu, Dec 24, 2015 at 11:25 AM, Aniroop Mathur <a.mathur@...sung.com> wrote:
>> The newest event can be SYN_REPORT in case of dropping all old events when
>> buffer is full, but as now there is no device data available to read so
>> lets drop SYN_REPORT as well and store only SYN_DROPPED.
>>
>
> We can not drop the SYN_REPORT event in this case as userspace needs
> it to determine if the events that are coming after SYN_DROPPED are
> part of a full packet or if they belong to a partial packet. From
> Documentation/input/event-codes.txt:
>
> * SYN_DROPPED:
>   - Used to indicate buffer overrun in the evdev client's event queue.
>     Client should ignore all events up to and including next SYN_REPORT
>     event and query the device (using EVIOCG* ioctls) to obtain its
>     current state.
>

Okay I see.

In case of buffer overrun, how about handling the partial packet case
in evdev handler itself and free evdev client from handling it ?

Normally, evdev buffer contain only full packets. But in case of dropping
events, buffer would contain a partial packet almost all times and hence
evdev client would have to handle the case of partial packet and
as documentation says, client will ignore the events until new packet
starts. So as a new protocol, after buffer overrun occurs, evdev handler
can ignore the events until SYN_REPORT occurs and then start storing
events. This way buffer will contain full packet as always and reading
would be simplified for evdev clients.
Accordingly, document can also be updated.

Please let me know your opinion about it.

Thanks and Regards,
Aniroop Mathur


> Thanks.
>
> --
> Dmitry
--
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