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: <20210903105607.35af6674@gandalf.local.home>
Date:   Fri, 3 Sep 2021 10:56:07 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Yury Norov <yury.norov@...il.com>, Petr Mladek <pmladek@...e.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lib/vsprintf: add __putchar()

On Sun, 29 Aug 2021 16:36:13 +0300
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> On Fri, Aug 27, 2021 at 10:11:55AM -0700, Yury Norov wrote:
> > There are 26 occurrences of the code snippet like this in the file :
> > 	if (buf < end)
> > 	        *buf = separator;
> > 	++buf;
> > 
> > This patch adds a helper function __putchar() to replace opencoding.
> > It adds a lot to readability, and also saves 43 bytes of text on x86.  
> 
> Last time I tried similar it failed the compilation.
> 
> Anyway, while you remove a lot of code I'm not sure it makes the code better
> to read and understand. Also, we use the same idiom outside of this file.
> 
> I would ask Rasmus' opinion on this.
> 

I actually like the clean up, although I haven't reviewed the entire patch.

If it is used outside this file, perhaps it should be in a header instead
and those other locations should be updated accordingly.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ