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: <20061120163946.38c878d7@gondolin.boeblingen.de.ibm.com>
Date:	Mon, 20 Nov 2006 16:39:46 +0100
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Greg KH <greg@...ah.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>,
	Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [Patch -mm 1/1] driver core: Introduce device_move(): move a
 device to a new parent.

On Mon, 20 Nov 2006 15:15:03 +0100,
Kay Sievers <kay.sievers@...y.org> wrote:

> > +void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
> > +			int num_envp, char *envp[])
> 
> We usually use a NULL terminated array for things like this. Does
> passing the number of entries give us an advantage?

In do_kobject_uevent:

  envp = kzalloc((NUM_ENVP + num_envp) * sizeof (char *), GFP_KERNEL);

We would either need to allocate (NUM_ENVP + NUM_EXT_ENVP) or NUM_ENVP
(as before).
 
> > +{
> > +	/* Disallow dumb users. */
> > +	if (num_envp > NUM_EXT_ENVP)
> > +		return;
> 
> Why do we need such a limit? There are still thousand other ways to
> screw things up. :)

If we removed this, we could also use only NUM_ENVP in the allocation
above and kill NUM_EXT_ENVP. Hm.

> And kobject_uevent() can just call kobject_uevent_env(), there is no
> need for the indirection with do_*, right?

OK, may look nicer. I'll respin.

-- 
Cornelia Huck
Linux for zSeries Developer
Tel.: +49-7031-16-4837, Mail: cornelia.huck@...ibm.com
-
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