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:	Thu, 28 Apr 2016 03:44:42 +0900
From:	Masami Hiramatsu <mhiramat@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Hemant Kumar <hemant@...ux.vnet.ibm.com>,
	Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Subject: Re: [PATCH perf/core v4 01/19] perf probe: Use strbuf for making
 strings

On Tue, 26 Apr 2016 11:59:34 -0300
Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

> Em Tue, Apr 26, 2016 at 11:40:47PM +0900, Masami Hiramatsu escreveu:
> > On Tue, 26 Apr 2016 10:36:57 -0300
> > Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> > 
> > > Em Tue, Apr 26, 2016 at 06:02:11PM +0900, Masami Hiramatsu escreveu:
> > > > From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> > > > 
> > > > Replace many fixed-length char array with strbuf to
> > > > stringify perf_probe_event and probe_trace_event etc.
> > > 
> > > Sure you want to do that? From time to time I try to reduce the strbuf
> > > usage, not grow it :-\
> > 
> > Aah, I got what you want.
> > 
> > > 
> > > That is one of the last users of xrealloc(), via that ALLOC_GROW()
> > > thing.
> > 
> > Hmm I'm not sure what you considering, memory usage? or code reducing?
> > I also would like to remove e_snprintf() use in perf probe by replacing
> > with strbuf functions. I'd like to find better way.
> 
> What I don't like is that xrealloc ends up calling die() :-\ It should
> instead propagate back the error.
> 
> In lots of cases I managed to use what is in glibc, asprintf(), that
> will allocate space and format in one go.
> 
> But strbuf has this addf() one that indeed is handy. So I think I'll
> take this patch as it is not for the simpler cases where asprintf() can
> be used.

OK, I'll try to remove die() and xrealloc() from the strbuf, since
it seems most of users of strbuf() is perf-probe.

Thanks,

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ