aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kmemcheck.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kmemcheck.h')
-rw-r--r--include/linux/kmemcheck.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h
index 39480c91b2f9..5b65f4ebeadf 100644
--- a/include/linux/kmemcheck.h
+++ b/include/linux/kmemcheck.h
@@ -7,11 +7,58 @@
7#ifdef CONFIG_KMEMCHECK 7#ifdef CONFIG_KMEMCHECK
8extern int kmemcheck_enabled; 8extern int kmemcheck_enabled;
9 9
10/* The slab-related functions. */
11void kmemcheck_alloc_shadow(struct kmem_cache *s, gfp_t flags, int node,
12 struct page *page, int order);
13void kmemcheck_free_shadow(struct kmem_cache *s, struct page *page, int order);
14void kmemcheck_slab_alloc(struct kmem_cache *s, gfp_t gfpflags, void *object,
15 size_t size);
16void kmemcheck_slab_free(struct kmem_cache *s, void *object, size_t size);
17
18void kmemcheck_show_pages(struct page *p, unsigned int n);
19void kmemcheck_hide_pages(struct page *p, unsigned int n);
20
21bool kmemcheck_page_is_tracked(struct page *p);
22
23void kmemcheck_mark_unallocated(void *address, unsigned int n);
24void kmemcheck_mark_uninitialized(void *address, unsigned int n);
25void kmemcheck_mark_initialized(void *address, unsigned int n);
26void kmemcheck_mark_freed(void *address, unsigned int n);
27
28void kmemcheck_mark_unallocated_pages(struct page *p, unsigned int n);
29void kmemcheck_mark_uninitialized_pages(struct page *p, unsigned int n);
30
10int kmemcheck_show_addr(unsigned long address); 31int kmemcheck_show_addr(unsigned long address);
11int kmemcheck_hide_addr(unsigned long address); 32int kmemcheck_hide_addr(unsigned long address);
12#else 33#else
13#define kmemcheck_enabled 0 34#define kmemcheck_enabled 0
14 35
36static inline void
37kmemcheck_alloc_shadow(struct kmem_cache *s, gfp_t flags, int node,
38 struct page *page, int order)
39{
40}
41
42static inline void
43kmemcheck_free_shadow(struct kmem_cache *s, struct page *page, int order)
44{
45}
46
47static inline void
48kmemcheck_slab_alloc(struct kmem_cache *s, gfp_t gfpflags, void *object,
49 size_t size)
50{
51}
52
53static inline void kmemcheck_slab_free(struct kmem_cache *s, void *object,
54 size_t size)
55{
56}
57
58static inline bool kmemcheck_page_is_tracked(struct page *p)
59{
60 return false;
61}
15#endif /* CONFIG_KMEMCHECK */ 62#endif /* CONFIG_KMEMCHECK */
16 63
17#endif /* LINUX_KMEMCHECK_H */ 64#endif /* LINUX_KMEMCHECK_H */