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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 May 2014 16:02:02 -0400 (EDT)
From:	Vince Weaver <vincent.weaver@...ne.edu>
To:	Vince Weaver <vincent.weaver@...ne.edu>
cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: perf: fuzzer getting stuck with slow memory leak

On Tue, 27 May 2014, Vince Weaver wrote:

> OK, the problem is in:
> 
> 	kernel/events/core.c find_get_context()
> 
> retry:
> 	perf_lock_task_context() returns NULL.
> 	alloc_perf_context()
> 	task->perf_event_ctxp[ctxn] is *not* NULL
> 	err == EAGAIN so jump to retry
> 
> stuck forever leaking the memory being allocated by alloc_perf_context().
> 
> I'm not sure what this code should be doing, but it looks like we'll 
> always leak memory if the EAGAIN case is triggered?

And actually no leak at all, because "put_ctx()" really means "free ctx".
Is that some sort of kernel idiom?

It would also be nice if it were "perf_put_ctx()" although I guess you 
don't name functions just so they're easier to enable when using ftrace
wildcards.

Vince
--
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