From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kees@kernel.org
Subject: Re: [PATCH v2] Input: gf2k: skip invalid hat lookup values
Date: Mon, 6 Apr 2026 22:12:17 -0700 [thread overview]
Message-ID: <adSSLtg5CeugykNO@google.com> (raw)
In-Reply-To: <20260407120001.1-gf2k-v2-pengpeng@iscas.ac.cn>
On Tue, Apr 07, 2026 at 09:56:52AM +0800, Pengpeng Hou wrote:
> gf2k_read() decodes the hat position from a 4-bit field and uses it
> directly to index gf2k_hat_to_axis[]. The lookup table only has nine
> entries, so malformed packets can read past the end of the fixed table.
>
> Skip hat reporting when the decoded value falls outside the lookup
> table instead of forcing it to the neutral position. This keeps the
> fix local and avoids reporting a made-up axis state for malformed
> packets.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Applied, thank you.
--
Dmitry
next prev parent reply other threads:[~2026-04-07 5:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 7:45 [PATCH] Input: gf2k: clamp hat values to the lookup table Pengpeng Hou
2026-03-25 3:07 ` Dmitry Torokhov
2026-04-07 1:56 ` [PATCH v2] Input: gf2k: skip invalid hat lookup values Pengpeng Hou
2026-04-07 5:12 ` Dmitry Torokhov [this message]
2026-04-07 3:30 ` [PATCH] Input: gf2k: clamp hat values to the lookup table Pengpeng Hou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adSSLtg5CeugykNO@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=kees@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pengpeng@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox