From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ping Cheng <pinglinux@gmail.com>
Cc: linux-input@vger.kernel.org,
Aaron Armstrong Skomra <skomra@gmail.com>,
Jason Gerecke <killertofu@gmail.com>,
Joshua Dickens <joshua.dickens@wacom.com>,
Joshua Dickens <Joshua@joshua-dickens.com>
Subject: Re: [PATCH] Input: wacom_w8001: Check for string overflow from strscpy calls
Date: Wed, 22 May 2024 10:23:31 -0700 [thread overview]
Message-ID: <Zk4qE1ij-0lnxjCT@google.com> (raw)
In-Reply-To: <CAF8JNhKqAOvxo3C1SaecaVP0uj4QeYpttybBgq_Jw7n18MLpcA@mail.gmail.com>
On Mon, May 20, 2024 at 08:55:30PM -0700, Ping Cheng wrote:
> On Mon, May 20, 2024 at 4:28 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>
> Hi Dmitry,
>
> > > This fix is the same as [1]. Without checking the return value,
> > > Wolfram's patch [2] fails our downstream build script. I'm adding my
> > > r-b, if it makes any difference ;).
> >
> > Could you please tell me how exactly it makes your build script to fail?
>
> We got an "unused-result warning". Jason made a temporary workaround
> at https://github.com/linuxwacom/input-wacom/commit/e83a9bb3e48d2d1b52ec709e60f73b9960d568e5.
I do not think strscpy is declared as __must_check. Do you have a repro
for the vanilla kernel build?
>
> > My concern is that the warnings are not actionable and therefore pretty
> > much worthless.
>
> The return value tells us which strscpy call(s) didn't have enough space.
Right, and what can be done about it? The driver does not control what
tty is being used for the serial port (and so can't control the prefix
of the 'phys'), we do not extend 'phys' (because it is used very
rarely). The only option is to truncate (which we already do).
So the warnings are not actionable.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2024-05-22 17:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 23:43 [PATCH] Input: wacom_w8001: Check for string overflow from strscpy calls joshua
2024-05-20 18:00 ` Ping Cheng
2024-05-20 23:28 ` Dmitry Torokhov
2024-05-21 3:55 ` Ping Cheng
2024-05-22 17:23 ` Dmitry Torokhov [this message]
2024-05-23 16:51 ` Jason Gerecke
2024-05-30 23:48 ` Dmitry Torokhov
2024-06-05 16:46 ` [PATCH] Input: wacom_w8001: Correct device name generation Gerecke, Jason
2024-06-06 21:09 ` Dmitry Torokhov
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=Zk4qE1ij-0lnxjCT@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=Joshua@joshua-dickens.com \
--cc=joshua.dickens@wacom.com \
--cc=killertofu@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=pinglinux@gmail.com \
--cc=skomra@gmail.com \
/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