lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=XiGJ1uV_s35dwCYwdzoAj4ycXOYRyDZMGLOM9+JY668A@mail.gmail.com>
Date: Tue, 13 May 2025 08:07:51 -0700
From: Doug Anderson <dianders@...omium.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, 
	Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, Bjorn Andersson <andersson@...nel.org>, 
	Guenter Roeck <linux@...ck-us.net>, Josh Cartwright <joshc@...eaurora.org>, 
	Matti Vaittinen <mazziesaccount@...il.com>, linux-arm-msm@...r.kernel.org, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] pinctrl: qcom: don't crash on enabling GPIO HOG pins

Hi,

On Tue, May 13, 2025 at 2:27 AM Linus Walleij <linus.walleij@...aro.org> wrote:
>
> Hi Dmitry,
>
> thanks for your patch!
>
> On Tue, May 6, 2025 at 7:28 PM Bartosz Golaszewski
> <bartosz.golaszewski@...aro.org> wrote:
> > On Sat, 3 May 2025 at 07:32, Dmitry Baryshkov
> > <dmitry.baryshkov@....qualcomm.com> wrote:
>
> > > +       /*
> > > +        * hog pins are requested before registering GPIO chip, don't crash in
> > > +        * gpiochip_line_is_valid().
> > > +        */
> > > +       if (!chip->gpiodev)
> > > +               return 0;
> > > +
> >
> > I really dislike you dereferencing gpiodev here which is (implicitly,
> > I know...) very much a private structure for GPIOLIB. Can we move this
> > into gpiochip_line_is_valid() itself?
>
> I agree with Bartosz. Patch gpiochip_line_is_valid() so everyone
> can benefit from the extended check.

Any chance we can get a solution landed sooner rather than later?
Every time I test mainline I have to account for this bug or my device
crashes at bootup. ;-)

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ