All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Armin Wolf <W_Armin@gmx.de>
Cc: "Barnabás Pőcze" <pobrn@protonmail.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: Tue, 4 Jul 2023 13:02:11 +0200	[thread overview]
Message-ID: <decdc3d2-8e30-3ca9-d64c-4c76b8f160ca@redhat.com> (raw)
In-Reply-To: <ZJRh9o1a0k0yMbOG@smile.fi.intel.com>

Hi Andy,

On 6/22/23 17:00, Andy Shevchenko wrote:
> 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?


I agree that warning on malformed GUIDs does not belong here and
your patch already drops the WARN_ON while switching to the new
guid_parse_and_compare() helper.

So I'll go and merge this into my fixes branch once rc1 is out.

Regards,

Hans



  reply	other threads:[~2023-07-04 11:03 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
2023-07-04 11:02           ` Hans de Goede [this message]
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=decdc3d2-8e30-3ca9-d64c-4c76b8f160ca@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=W_Armin@gmx.de \
    --cc=andriy.shevchenko@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.