[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZKacNbTKz6rgWgww@smile.fi.intel.com>
Date: Thu, 6 Jul 2023 13:49:25 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Armin Wolf <W_Armin@....de>,
Barnabás Pőcze <pobrn@...tonmail.com>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
Mark Gross <markgross@...nel.org>
Subject: Re: [PATCH v1 1/2] platform/x86: wmi: Break possible infinite loop
when parsing GUID
On Tue, Jul 04, 2023 at 01:02:11PM +0200, Hans de Goede wrote:
> 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.
Thank you!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists