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-next>] [day] [month] [year] [list]
Message-Id: <1413893969-25798-1-git-send-email-thierry.reding@gmail.com>
Date:	Tue, 21 Oct 2014 14:19:29 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mm/kmemleak: Do not skip stack frames

From: Thierry Reding <treding@...dia.com>

Trying to chase down memory leaks is much easier when the complete stack
trace is available.

Signed-off-by: Thierry Reding <treding@...dia.com>
---
It seems like this was initially set to 1 when merged in commit
3c7b4e6b8be4 (kmemleak: Add the base support) and later increased to 2
in commit fd6789675ebf (kmemleak: Save the stack trace for early
allocations). Perhaps there was a reason to skip the first few frames,
but I've certainly found it difficult to find leaks when the stack trace
doesn't point at the proper location.
---
 mm/kmemleak.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 3cda50c1e394..55d9ad0f40d4 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -503,7 +503,7 @@ static int __save_stack_trace(unsigned long *trace)
 	stack_trace.max_entries = MAX_TRACE;
 	stack_trace.nr_entries = 0;
 	stack_trace.entries = trace;
-	stack_trace.skip = 2;
+	stack_trace.skip = 0;
 	save_stack_trace(&stack_trace);
 
 	return stack_trace.nr_entries;
-- 
2.1.2

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