linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] mm: kmemleak: Improve vmalloc() false positives for thread stack allocation
@ 2017-05-25 15:42 Catalin Marinas
  2017-05-25 15:42 ` [PATCH v2 1/3] mm: kmemleak: Slightly reduce the size of some structures on 64-bit architectures Catalin Marinas
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Catalin Marinas @ 2017-05-25 15:42 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, Michal Hocko, Andy Lutomirski, Luis R. Rodriguez,
	Andrew Morton

Hi,

This is a follow up from [1] (mm: kmemleak: Treat vm_struct as
alternative reference to vmalloc'ed objects).

The first two patches are just clean-up and refactoring. The third
introduces the kmemleak_vmalloc() API which allows a vmalloc() caller to
keep either the returned pointer or a pointer to vm_struct as a
reference (see the patch description for the implementation details).
The false positives were noticed with alloc_thread_stack_node(),
free_thread_stack() and CONFIG_VMAP_STACK where a per-CPU array is used
to cache the freed thread stacks as vm_struct pointers.

Changes since v1:

- Split the patch into three for easier review
- Only call update_refs() if !color_gray() on the found object, it
  avoids an unnecessary function call

[1] http://lkml.kernel.org/r/1495474514-24425-1-git-send-email-catalin.marinas@arm.com

Catalin Marinas (3):
  mm: kmemleak: Slightly reduce the size of some structures on 64-bit
    architectures
  mm: kmemleak: Factor object reference updating out of scan_block()
  mm: kmemleak: Treat vm_struct as alternative reference to vmalloc'ed
    objects

 Documentation/dev-tools/kmemleak.rst |   1 +
 include/linux/kmemleak.h             |   7 ++
 mm/kmemleak.c                        | 136 +++++++++++++++++++++++++++++------
 mm/vmalloc.c                         |   7 +-
 4 files changed, 123 insertions(+), 28 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-26 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 15:42 [PATCH v2 0/3] mm: kmemleak: Improve vmalloc() false positives for thread stack allocation Catalin Marinas
2017-05-25 15:42 ` [PATCH v2 1/3] mm: kmemleak: Slightly reduce the size of some structures on 64-bit architectures Catalin Marinas
2017-05-25 15:42 ` [PATCH v2 2/3] mm: kmemleak: Factor object reference updating out of scan_block() Catalin Marinas
2017-05-26 16:09   ` Luis Henriques
2017-05-26 16:21     ` Catalin Marinas
2017-05-26 16:23       ` Catalin Marinas
2017-05-26 17:19         ` Luis Henriques
2017-05-25 15:42 ` [PATCH v2 3/3] mm: kmemleak: Treat vm_struct as alternative reference to vmalloc'ed objects Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).