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]
Date:	Fri, 24 Feb 2012 16:40:39 +0800
From:	Dong Aisheng <aisheng.dong@...escale.com>
To:	Stephen Warren <swarren@...dia.com>
CC:	Linus Walleij <linus.walleij@...aro.org>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	"B29396@...escale.com" <B29396@...escale.com>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
	"dongas86@...il.com" <dongas86@...il.com>,
	"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
	"thomas.abraham@...aro.org" <thomas.abraham@...aro.org>,
	"tony@...mide.com" <tony@...mide.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/20] pinctrl: Assume map table entries can't have a
 NULL name field

On Thu, Feb 23, 2012 at 08:39:58AM -0800, Stephen Warren wrote:
> Dong Aisheng wrote at Wednesday, February 22, 2012 9:48 PM:
> > On Wed, Feb 22, 2012 at 07:53:44PM -0800, Stephen Warren wrote:
> ...
> > > I'm hoping that we don't do this internal conversion. The rules I'd like are:
> ...
> > > * Every mapping table entry must include a non-NULL name field.
> > >
> > > * Every call to pinctrl_get()/pinctrl_lookup_state() must pass a non-NULL name
> >
> > This is a way.
> > 
> > Before using this, i'm  still wondering what big problems do you think for us to support
> > a NULL map name?
> > Because the name for devices do not have different state really does not make too much
> > sense but extra overhead.
> 
> If we disallow NULL names, it simplifies the code in the pinctrl core;
> when registering mappings or right at the start of pinctrl_get() or
> pinctrl_lookup_state(), we check if the name is NULL and if so error out.
> Everywhere else can then assume name!=NULL, and hence not have special-
> cases for name==NULL, e.g.:
> 
> In debug code:
> name ? name : "(unnamed)"
> vs.:
> name
> 
> When matching mapping table entries:
> match = !name ? !map->name : !strcmp(name, map->name)
> vs.:
> match = !strcmp(name, map->name)
> 
> Similar for the body of pinctrl_lookup_state().
> 
Yes, it does make thing simple.
But i guess it's not the key point to not support NULL state name, right?

> Equally, it's not possible to generate a mapping table entry with a NULL
> name from device tree given the bindings we discussed, so disallowing them
> everywhere keeps things consistent.
> 
Yes, i'm wondering if we can change it a bit to support NULL name.
I replied with my idea in another mail before this one.

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ