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: <Yd1p1XckKtdPyKSr@smile.fi.intel.com>
Date:   Tue, 11 Jan 2022 13:28:21 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
        Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH v1 1/1] vsprintf: Move space out of string literals in
 fourcc_string()

On Tue, Jan 11, 2022 at 11:26:21AM +0100, Rasmus Villemoes wrote:
> On 10/01/2022 21.55, Andy Shevchenko wrote:
> > The literals "big-endian" and "little-endian" may be potentially
> > occurred in other places. Dropping space allows compiler to
> > "compress" them by using only a single copy.
> 
> Nit: it's not the compiler which does that, but the linker.

Ah, I stand corrected, thanks!

> > -	strcpy(p, orig & BIT(31) ? " big-endian" : " little-endian");
> > +	*p++ = ' ';
> > +	strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
> >  	p += strlen(p);
> 
> Hm, ok, those two strings do occur a lot with of_property_read_bool()
> and friends. But if you're micro-optimizing anyway, why not drop the
> strlen() and say p = stpcpy(...) instead?

Why not? I'll do it for v2.

Any thoughts / comments on the
https://lore.kernel.org/lkml/20220110205049.11696-1-andriy.shevchenko@linux.intel.com/T/#u?
I'm asking since dependency and I would like to know if we still want that
fix or not.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ