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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240827202204.b76c0510bf44cdfb6d3a74bd@linux-foundation.org>
Date: Tue, 27 Aug 2024 20:22:04 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Hongbo Li <lihongbo22@...wei.com>
Cc: <kees@...nel.org>, <andy@...nel.org>, <trondmy@...nel.org>,
 <anna@...nel.org>, <gregkh@...uxfoundation.org>,
 <linux-hardening@...r.kernel.org>, <linux-mm@...ck.org>,
 <linux-nfs@...r.kernel.org>
Subject: Re: [PATCH -next v3 1/3] lib/string_choices: Add
 str_true_false()/str_false_true() helper

On Wed, 28 Aug 2024 09:48:21 +0800 Hongbo Li <lihongbo22@...wei.com> wrote:

> > This might result in copies of the strings "true" and "false" being
> > generated for every .c file which uses this function, resulting in
> > unnecessary bloat.
> > 
> > It's possible that the compiler/linker can eliminate this duplication.
> > If not, I suggest that every function in string_choices.h be uninlined.
> The inline function is in header file, it will cause code expansion. It 
> should avoid the the copies of the strings.

Sorry, I don't understand your reply.

Anything which is calling these functions is not performance-sensitive,
so optimizing for space is preferred.  An out-of-line function which
returns a const char * will achieve this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ