summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2026-08-03 22:09:54 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-08-03 22:24:02 -0700
commit7f9c8c6716a97e55ab52426df98a3b4007174757 (patch)
tree76e40ec495c1762a99a6c9981b9d97378a475cec /tools/perf/scripts/python/netdev-times.py
parentfbe47f041262590f4dc1267f90fa97a0506acb28 (diff)
Input: focaltech - use signed coordinates to prevent underflow
focaltech_finger_state stores finger coordinates x and y as unsigned int. When processing relative packets, negative deltas can cause unsigned integer underflow if the finger moves past the left or bottom boundary of the touchpad, wrapping the coordinates to values near UINT_MAX. When clamping the coordinates in focaltech_report_state(), these underflowed values are clamped against priv->x_max / priv->y_max instead of 0, causing the cursor to jump erratically to the opposite edge of the touchpad. Change the coordinate variables and limits to signed int so that negative values resulting from relative movements clamp correctly to 0, and write the clamped values back to state in focaltech_report_state() to prevent coordinate wind-up accumulation at the touchpad boundaries. Fixes: 05be1d079ec0 ("Input: psmouse - support for the FocalTech PS/2 protocol extensions") Reported-by: sashiko-bot@kernel.org Link: https://patch.msgid.link/am_tH_F938rK6ask@google.com Assisted-by: Antigravity:gemini-3.6-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions