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] [day] [month] [year] [list]
Message-ID: <91b13c310811190937ob9eddal28ef0d69ed32445c@mail.gmail.com>
Date:	Thu, 20 Nov 2008 01:37:36 +0800
From:	"rae l" <crquan@...il.com>
To:	"Kay Sievers" <kay.sievers@...y.org>
Cc:	"Greg KH" <gregkh@...e.de>, "Jens Axboe" <jens.axboe@...cle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kobject_add: use constant strings directly as fmt strings

On Thu, Nov 20, 2008 at 1:00 AM, Kay Sievers <kay.sievers@...y.org> wrote:
> Not that we should be able to measure it, but it should save some
> cycles parsing the format character and retrieving the string pointer
> from the stack, yes.

I'm sure it does work, one another as:

*** drivers/net/iseries_veth.c:
veth_probe_one[1088]           if (0 != kobject_add(&port->kobject,
&dev->dev.kobj, "veth_port"))

>> so if the string is constant, why not use it directly as the fmt string?
>
> It should be fine for strings, where you can be sure they can never
> contain a '%', sure.
And I have searched all places kobject_add called, only these two
places in block/blk-sysfs.c
and block/elevator.c have constant strings. So this patch is the whole
kobject_add constant string
optmization patch.

>
> Thanks,
> Kay

-- 
Cheng Renquan, Shenzhen, China
Fred Allen  - "An associate producer is the only guy in Hollywood who
will associate with a producer."
--
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