mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Tissoires <bentiss@kernel.org>
To: Matteo Croce <technoboy85@gmail.com>
Cc: Lee Jones <lee@kernel.org>, Jiri Kosina <jikos@kernel.org>,
	 linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matteo Croce <teknoraver@meta.com>
Subject: Re: [PATCH v2] HID: core: demote warning to debug level
Date: Mon, 24 Aug 2026 22:41:04 +0200	[thread overview]
Message-ID: <aoyraknxt1TLhRe4@beelink> (raw)
In-Reply-To: <CAFnufp1pvgqvQqa_L+XFAsVd=rds4L9L14tg7B5kHtRdKFwViw@mail.gmail.com>

On Aug 24 2026, Matteo Croce wrote:
> Il giorno lun 24 ago 2026 alle ore 12:25 Lee Jones <lee@kernel.org> ha scritto:
> >
> > On Wed, 10 Jun 2026, Jiri Kosina wrote:
> >
> > > On Sat, 23 May 2026, Matteo Croce wrote:
> > >
> > > > From: Matteo Croce <teknoraver@meta.com>
> > > >
> > > > The log level for short  messages was changed from debug to warning,
> > > > flooding syslog on systems with devices that regularly send
> > > > short reports, in my case an UPS:
> > > >
> > > >     $ dmesg |grep -c 'Event data for report .* was too short'
> > > >     35
> > > >
> > > > Demote it back to debug level.
> > > >
> > > > Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
> > > > Signed-off-by: Matteo Croce <teknoraver@meta.com>
> > >
> > > Applied, thanks.
> >
> > FWIW, I'd like to contest this patch.
> >
> > The warning is real.  It means that the HID report was rejected and as
> > such something on the system will be now be non-functional.  Silencing
> > the warning is not helpful.  It does not fix the issue, and now the user
> > / admin has no idea that its even happening.
> >
> > This warning has caught a bunch of genuine issues related to testing
> > infrastructure and incorrectly coded firmware that have subsequently
> > been rectified.
> >
> > Please don't hide this issue.  Fix the root cause instead.
> >
> > --
> > Lee Jones
> 
> Hi,
> 
> the message was debug long before and was promoted to warning during a refactor.
> With my patch I just restored the previous priority.
> 

Sorry, but no. The new kernel code restored the old behavior: if the
incoming buffer is long enough but the incoming report has a shorter
size, we still have the dbg_hid() call, so it's transparent for users.

The hid_warns are now only emitted when there is an obvious error with
the report *that the kernel can not fix*.

So having this patch would do exactly what Lee said: this would prevent
users to understand why their device doesn't work.

This patch "fixed" a temporary wrong attempt at solving an OOB, the old
behavior is restored, we should not even have this type of arguments.

Cheers,
Benjamin

      parent reply	other threads:[~2026-08-24 20:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23 10:55 Matteo Croce
2026-06-10 15:44 ` Jiri Kosina
2026-08-24 10:25   ` Lee Jones
2026-08-24 13:16     ` Benjamin Tissoires
2026-08-24 14:22       ` Lee Jones
2026-08-24 15:02         ` Benjamin Tissoires
2026-08-24 20:16           ` Lee Jones
2026-08-24 18:29     ` Matteo Croce
2026-08-24 20:18       ` Lee Jones
2026-08-24 20:41       ` Benjamin Tissoires [this message]

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=aoyraknxt1TLhRe4@beelink \
    --to=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=technoboy85@gmail.com \
    --cc=teknoraver@meta.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

all inboxes | Powered by JetHome®