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, 27 Sep 2012 13:02:05 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Feng Tang <feng.tang@...el.com>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>, mingo@...e.hu,
	a.p.zijlstra@...llo.nl, andi@...stfloor.org, dsahern@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

Hi Feng,

On Wed, 26 Sep 2012 15:57:07 +0800, Feng Tang wrote:
> On Tue, Sep 25, 2012 at 08:17:03AM -0300, Arnaldo Carvalho de Melo wrote:
>> Em Tue, Sep 25, 2012 at 04:20:53PM +0800, Feng Tang escreveu:
>> > On Tue, 25 Sep 2012 11:11:21 +0900
>> > Namhyung Kim <namhyung@...nel.org> wrote:
>> > > Ditto.  Plus it might leak previous input_name.
>> > 
>> > Nice catch, will check the return value of "strdup". 
>> > 
>> > For input_name mem leak, in some cases the input_name can't be called
>> >  with free(), like those got from parse "-i" option. In case the old
>> > input_name is got from malloc through strdup, I think it's not a big
>> > issue given that buffer will be freed any way when the application exit.
>> 
>> I think this is a matter of discipline, leaking is bad, kernel or
>> userspace, why special case it?
>>
>
> I see, then we need make sure all "input_name" point to a malloced buffer, 
> here is a initial debug patch will only touch the annotate/report/script
> cmds, pls review and more suggestions are welcomed:

Well, how about adding a flag like "input_name_alloced" and checking it
before new allocation?  This way we can avoid needless strdup when
runtime switching is not used.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ