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: <20180925031558.3k6ukkfhbndgbm65@xps.therub.org>
Date:   Mon, 24 Sep 2018 22:15:58 -0500
From:   Dan Rue <dan.rue@...aro.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        "H. Nikolaus Schaller" <hns@...delico.com>,
        Christ van Willegen <cvwillegen@...il.com>,
        Haojian Zhuang <haojian.zhuang@...aro.org>,
        Jacopo Mondi <jacopo+renesas@...ndi.org>,
        Paul Cercueil <paul@...pouillou.net>,
        Sean Wang <sean.wang@...iatek.com>,
        Tony Lindgren <tony@...mide.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Sasha Levin <alexander.levin@...rosoft.com>
Subject: Re: [PATCH 4.18 164/235] pinctrl: pinmux: Return selector to the
 pinctrl driver

On Mon, Sep 24, 2018 at 06:07:10PM -0500, Dan Rue wrote:
> On Mon, Sep 24, 2018 at 01:52:30PM +0200, Greg Kroah-Hartman wrote:
> > 4.18-stable review patch.  If anyone has any objections, please let me know.
> 
> I bisected a boot failure on an x15 (arm) board to this commit on
> 4.18.10-rc1. I'm also seeing issues on 4.14 and 4.18 with arm64 boards
> hikey and dragonboard 410c, but I have not investigated them yet (they
> could be unrelated).
> 
> I see there are fixes to this commit that have not been backported.
> Namely:
> 
> 823dd71f58eb ("pinctrl: ingenic: Fix group & function error checking")
> a203728ac6bb ("pinctrl: core: Return selector to the pinctrl driver")
> 
> However, I tried adding those two in but I still see the boot failure on
> x15.

Dropping 9c5cd7b6ca4e ("pinctrl: pinmux: Return selector to the pinctrl
driver") does appear to fix the boot issues I'm seeing on x15 and hikey.

Dan

> 
> Dan
> 
> > 
> > ------------------
> > 
> > From: Tony Lindgren <tony@...mide.com>
> > 
> > [ Upstream commit f913cfce4ee49a3382a9ff95696f49a46e56e974 ]
> > 
> > We must return the selector from pinmux_generic_add_function() so
> > pin controller device drivers can remove the right group if needed
> > for deferred probe for example. And we now must make sure that a
> > proper name is passed so we can use it to check if the entry already
> > exists.
> > 
> > Note that fixes are also needed for the pin controller drivers to
> > use the selector value.
> > 
> > Fixes: a76edc89b100 ("pinctrl: core: Add generic pinctrl functions for
> > managing groups")
> > Reported-by: H. Nikolaus Schaller <hns@...delico.com>
> > Cc: Christ van Willegen <cvwillegen@...il.com>
> > Cc: Haojian Zhuang <haojian.zhuang@...aro.org>
> > Cc: Jacopo Mondi <jacopo+renesas@...ndi.org>
> > Cc: Paul Cercueil <paul@...pouillou.net>
> > Cc: Sean Wang <sean.wang@...iatek.com>
> > Signed-off-by: Tony Lindgren <tony@...mide.com>
> > Tested-By: H. Nikolaus Schaller <hns@...delico.com>
> > Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> > Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
> > Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > ---
> >  drivers/pinctrl/pinmux.c |   16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> > 
> > --- a/drivers/pinctrl/pinmux.c
> > +++ b/drivers/pinctrl/pinmux.c
> > @@ -308,7 +308,6 @@ static int pinmux_func_name_to_selector(
> >  		selector++;
> >  	}
> >  
> > -	dev_err(pctldev->dev, "function '%s' not supported\n", function);
> >  	return -EINVAL;
> >  }
> >  
> > @@ -775,6 +774,16 @@ int pinmux_generic_add_function(struct p
> >  				void *data)
> >  {
> >  	struct function_desc *function;
> > +	int selector;
> > +
> > +	if (!name)
> > +		return -EINVAL;
> > +
> > +	selector = pinmux_func_name_to_selector(pctldev, name);
> > +	if (selector >= 0)
> > +		return selector;
> > +
> > +	selector = pctldev->num_functions;
> >  
> >  	function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL);
> >  	if (!function)
> > @@ -785,12 +794,11 @@ int pinmux_generic_add_function(struct p
> >  	function->num_group_names = num_groups;
> >  	function->data = data;
> >  
> > -	radix_tree_insert(&pctldev->pin_function_tree, pctldev->num_functions,
> > -			  function);
> > +	radix_tree_insert(&pctldev->pin_function_tree, selector, function);
> >  
> >  	pctldev->num_functions++;
> >  
> > -	return 0;
> > +	return selector;
> >  }
> >  EXPORT_SYMBOL_GPL(pinmux_generic_add_function);
> >  
> > 
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ