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-next>] [day] [month] [year] [list]
Date:	Thu, 24 Sep 2015 09:25:06 +0200
From:	Olliver Schinagl <oliver+list@...inagl.nl>
To:	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Grant Likely <grant.likely@...aro.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Alexandre Courbot <gnurou@...il.com>
CC:	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: gpios search behaviour for gpio from _DSD

Hey list, Mika,

With commit 0d9a693cc86 the following snippet of code was added:

+       /* Try first from _DSD */
+       for (i = 0; i < ARRAY_SIZE(suffixes); i++) {
+               if (con_id && strcmp(con_id, "gpios")) {
+                       snprintf(propname, sizeof(propname), "%s-%s",
+                                con_id, suffixes[i]);

and I was wondering why the gpios suffix is singled out. Are we not 
allowed to check for all the strings in the suffixes array? Is gpios 
special or is gpio simply not allowed. If that strcmp check would be 
removed, would bad things happen?

Also, just to educate myself, isn't relying on left to right parsing 
complier specifc? E.g. if con_id is null, we end up passing NULL to 
strcmp and atleast for libc can cause segfaults iirc.

Thanks,
Olliver

--
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