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: <CAK8ByeKz1uxFqTPHxkj0+1fiU-gFN4q+_rGHWmE2U-rSY=sRdg@mail.gmail.com>
Date:   Fri, 10 Nov 2023 15:51:17 +0100
From:   Łukasz Bartosik <lb@...ihalf.com>
To:     Steven Rostedt <rostedt@...dmis.org>,
        Jim Cromie <jim.cromie@...il.com>
Cc:     Jason Baron <jbaron@...mai.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Guenter Roeck <groeck@...gle.com>,
        Yaniv Tzoreff <yanivt@...gle.com>,
        Benson Leung <bleung@...gle.com>,
        Vincent Whitchurch <vincent.whitchurch@...s.com>,
        Pekka Paalanen <ppaalanen@...il.com>,
        Sean Paul <seanpaul@...omium.org>,
        Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org,
        upstream@...ihalf.com
Subject: Re: [PATCH v1 06/12] trace: use TP_printk_no_nl in dyndbg:prdbg,devdbg

wt., 7 lis 2023 o 01:45 Steven Rostedt <rostedt@...dmis.org> napisał(a):
>
> On Fri,  3 Nov 2023 14:10:05 +0100
> Łukasz Bartosik <lb@...ihalf.com> wrote:
>
> > index ccc5bcb070f9..91dcdbe059c0 100644
> > --- a/include/trace/events/dyndbg.h
> > +++ b/include/trace/events/dyndbg.h
> > @@ -20,20 +20,10 @@ TRACE_EVENT(prdbg,
> >
> >           TP_fast_assign(
> >                       __entry->desc = desc;
> > -                     /*
> > -                      * Each trace entry is printed in a new line.
> > -                      * If the msg finishes with '\n', cut it off
> > -                      * to avoid blank lines in the trace.
> > -                      */
> > -                     if (len > 0 && (text[len - 1] == '\n'))
> > -                             len -= 1;
> > -
> >                       memcpy(__get_str(msg), text, len);
> > -                     __get_str(msg)[len] = 0;
> >                   ),
> >
> > -         TP_printk("%s.%s %s", __entry->desc->modname,
> > -                   __entry->desc->function, __get_str(msg))
> > +         TP_printk_no_nl("%s", __get_str(msg))
> >  );
> >
>
> Instead of adding the TP_printk_no_nl() (Which I still do not like), we
> could add a:
>
>         __get_str_strip_nl(msg)
>
> That will do the above loop. Which will move the processing to read side
> (slow path).
>
> And then we could update libtraceevent to handle that too.
>

Thanks Steve.

Jim, if you don't mind I will make the suggested changes ?

> -- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ