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]
Date:   Tue, 19 Mar 2019 12:39:25 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2/resend] tracing: eliminate const char[] auto
 variables

On Mon, 18 Mar 2019 21:53:57 +0000
Al Viro <viro@...iv.linux.org.uk> wrote:

> On Mon, Mar 18, 2019 at 10:34:27PM +0100, Rasmus Villemoes wrote:
> 
> > I didn't get any response to this; just let me know if you don't want
> > this kind of microoptimization patches.  

It got lost in my inbox, which should happen less, now that I got
patchwork running on it ;-)

> 
> Umm...  What's wrong with "%*s", width, "" instead of those games?
> As in
> {
>         bool tgid = flags & TRACE_ITER_RECORD_TGID;
> 	int width = tgid ? 10 : 2;
> 
>         print_event_info(buf, m);
> 
>         seq_printf(m, "#                          %*s  _-----=> irqs-off\n",
> 		   width, "");
>         seq_printf(m, "#                          %*s / _----=> need-resched\n",
> 		   width, "");
>         seq_printf(m, "#                          %*s| / _---=> hardirq/softirq\n",
> 		   width, "");
>         seq_printf(m, "#                          %*s|| / _--=> preempt-depth\n",
> 		   width, "");
>         seq_printf(m, "#                          %*s||| /     delay\n",
> 		   width, "");
>         seq_printf(m, "#           TASK-PID %*sCPU#  ||||    TIMESTAMP  FUNCTION\n",
> 		   width, tgid ? "TGID   " : "");
>         seq_printf(m, "#              | |   %*s  |   ||||       |         |\n",
> 		   width, "");
> }
> and bugger those constants...

That's a possibility.

> 
> PS: it's very tempting to add some warlording to that piece of... ASCII art

Yeah, this code all came from the original "latency-tracer" that was in
the PREEMPT_RT patch set, and had some historical crud attached.

I'm fine with switching it to use the *s notation.

Rasmus, want to send another patch?

I have no issues with your other changes.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ