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:   Tue, 16 Oct 2018 17:53:03 +0300
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [RFC PATCH 3/5] drivers: base: Introducing software nodes to the
 firmware node framework

On Tue, Oct 16, 2018 at 03:57:43PM +0300, Andy Shevchenko wrote:
> > +static int property_entry_read_string_array(const struct property_entry *props,
> > +					    const char *propname,
> > +					    const char **strings, size_t nval)
> > +{
> > +	const struct property_entry *prop;
> > +	const void *pointer;
> > +	size_t array_len, length;
> > +
> > +	/* Find out the array length. */
> > +	prop = property_entry_get(props, propname);
> > +	if (!prop)
> > +		return -EINVAL;
> > +
> 
> > +	if (!prop->is_array)
> > +		/* The array length for a non-array string property is 1. */
> > +		array_len = 1;
> > +	else
> > +		/* Find the length of an array. */
> > +		array_len = property_entry_count_elems_of_size(props, propname,
> > +							  sizeof(const char *));
> 
> I understand where it comes from, but here we may use positive condition.

OK.

> > +#define NODE_NAME_MAXSIZE	11
> 
> sizeof(int) = 4 (32 bits), so, 32 * 3 / 10 ~= 10. On top are "node" and '\0'.
> Thus, I would rather put 16 here. Or limit the maximum for ida_simple_get().

Let's make it 16.


thanks,

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ