From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Armin Wolf <W_Armin@gmx.de>
Cc: "Barnabás Pőcze" <pobrn@protonmail.com>,
"Hans de Goede" <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, "Mark Gross" <markgross@kernel.org>
Subject: Re: [PATCH v1 1/2] platform/x86: wmi: Break possible infinite loop when parsing GUID
Date: Thu, 22 Jun 2023 18:00:06 +0300 [thread overview]
Message-ID: <ZJRh9o1a0k0yMbOG@smile.fi.intel.com> (raw)
In-Reply-To: <ZJQJqHbZy+00qhsz@smile.fi.intel.com>
On Thu, Jun 22, 2023 at 11:43:20AM +0300, Andy Shevchenko wrote:
> On Wed, Jun 21, 2023 at 11:50:51PM +0200, Armin Wolf wrote:
...
> I think that WARN_ON() is a bit bogus. First of all, it can be easily
> transformed to BUG()-equivalent with panic_on_oops and hence kill the
> entire system. If we need the message about wrong GUID format, it should
> be done elsewhere (modpost ?). I.o.w. we shan't expect that code,
> controlled by us, shoots to our foot.
Additional info. There will be another driver elsewhere that may use similar
API and also needs GUID in device ID table.
Looking into that implementation it seems that validation should be made in
file2alias.c for WMI and reused by that driver.
So, taking into account that we have no wrong IDs so far, I would drop
WARN_ON() here and guarantee that file2alias.c will be changed to validate
the GUID one way or the other.
Would it work? Hans, what is your comment here?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-06-22 15:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 15:11 [PATCH v1 1/2] platform/x86: wmi: Break possible infinite loop when parsing GUID Andy Shevchenko
2023-06-21 15:11 ` [PATCH v1 2/2] platform/x86: wmi: Replace open coded guid_parse_and_compare() Andy Shevchenko
2023-06-21 21:21 ` Armin Wolf
2023-06-21 21:20 ` [PATCH v1 1/2] platform/x86: wmi: Break possible infinite loop when parsing GUID Armin Wolf
2023-06-21 21:29 ` Barnabás Pőcze
2023-06-21 21:50 ` Armin Wolf
2023-06-22 8:43 ` Andy Shevchenko
2023-06-22 15:00 ` Andy Shevchenko [this message]
2023-07-04 11:02 ` Hans de Goede
2023-07-06 10:49 ` Andy Shevchenko
2023-06-22 8:44 ` Andy Shevchenko
2023-07-11 9:36 ` Hans de Goede
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=ZJRh9o1a0k0yMbOG@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=W_Armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pobrn@protonmail.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