diff options
author | Levin, Alexander (Sasha Levin) <alexander.levin@verizon.com> | 2017-11-15 20:35:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-15 21:21:05 -0500 |
commit | d8be75663cec0069b85f80191abd2682ce4a512f (patch) | |
tree | 9f239fc2e6c3bedc3c72150ac14ea26b4d191ad3 | |
parent | 75f296d93bcebcfe375884ddac79e30263a31766 (diff) |
kmemcheck: remove whats left of NOTRACK flags
Now that kmemcheck is gone, we don't need the NOTRACK flags.
Link: http://lkml.kernel.org/r/20171007030159.22241-5-alexander.levin@verizon.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tim Hansen <devtimhansen@gmail.com>
Cc: Vegard Nossum <vegardno@ifi.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_types.h | 13 | ||||
-rw-r--r-- | include/linux/gfp.h | 9 | ||||
-rw-r--r-- | include/linux/slab.h | 6 | ||||
-rw-r--r-- | include/trace/events/mmflags.h | 1 | ||||
-rw-r--r-- | mm/slub.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-kmem.c | 1 |
7 files changed, 0 insertions, 37 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index f735c3016325..09f9e1e00e3b 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -667,11 +667,6 @@ static inline bool pte_accessible(struct mm_struct *mm, pte_t a) | |||
667 | return false; | 667 | return false; |
668 | } | 668 | } |
669 | 669 | ||
670 | static inline int pte_hidden(pte_t pte) | ||
671 | { | ||
672 | return pte_flags(pte) & _PAGE_HIDDEN; | ||
673 | } | ||
674 | |||
675 | static inline int pmd_present(pmd_t pmd) | 670 | static inline int pmd_present(pmd_t pmd) |
676 | { | 671 | { |
677 | /* | 672 | /* |
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index 9e9b05fc4860..3696398a9475 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_SOFTW1 | 33 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_SOFTW1 |
34 | #define _PAGE_BIT_CPA_TEST _PAGE_BIT_SOFTW1 | 34 | #define _PAGE_BIT_CPA_TEST _PAGE_BIT_SOFTW1 |
35 | #define _PAGE_BIT_HIDDEN _PAGE_BIT_SOFTW3 /* hidden by kmemcheck */ | ||
36 | #define _PAGE_BIT_SOFT_DIRTY _PAGE_BIT_SOFTW3 /* software dirty tracking */ | 35 | #define _PAGE_BIT_SOFT_DIRTY _PAGE_BIT_SOFTW3 /* software dirty tracking */ |
37 | #define _PAGE_BIT_DEVMAP _PAGE_BIT_SOFTW4 | 36 | #define _PAGE_BIT_DEVMAP _PAGE_BIT_SOFTW4 |
38 | 37 | ||
@@ -79,18 +78,6 @@ | |||
79 | #define _PAGE_KNL_ERRATUM_MASK 0 | 78 | #define _PAGE_KNL_ERRATUM_MASK 0 |
80 | #endif | 79 | #endif |
81 | 80 | ||
82 | #ifdef CONFIG_KMEMCHECK | ||
83 | #define _PAGE_HIDDEN (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) | ||
84 | #else | ||
85 | #define _PAGE_HIDDEN (_AT(pteval_t, 0)) | ||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * The same hidden bit is used by kmemcheck, but since kmemcheck | ||
90 | * works on kernel pages while soft-dirty engine on user space, | ||
91 | * they do not conflict with each other. | ||
92 | */ | ||
93 | |||
94 | #ifdef CONFIG_MEM_SOFT_DIRTY | 81 | #ifdef CONFIG_MEM_SOFT_DIRTY |
95 | #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_SOFT_DIRTY) | 82 | #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_SOFT_DIRTY) |
96 | #else | 83 | #else |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 710143741eb5..b041f94678de 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -37,7 +37,6 @@ struct vm_area_struct; | |||
37 | #define ___GFP_THISNODE 0x40000u | 37 | #define ___GFP_THISNODE 0x40000u |
38 | #define ___GFP_ATOMIC 0x80000u | 38 | #define ___GFP_ATOMIC 0x80000u |
39 | #define ___GFP_ACCOUNT 0x100000u | 39 | #define ___GFP_ACCOUNT 0x100000u |
40 | #define ___GFP_NOTRACK 0x200000u | ||
41 | #define ___GFP_DIRECT_RECLAIM 0x400000u | 40 | #define ___GFP_DIRECT_RECLAIM 0x400000u |
42 | #define ___GFP_WRITE 0x800000u | 41 | #define ___GFP_WRITE 0x800000u |
43 | #define ___GFP_KSWAPD_RECLAIM 0x1000000u | 42 | #define ___GFP_KSWAPD_RECLAIM 0x1000000u |
@@ -201,19 +200,11 @@ struct vm_area_struct; | |||
201 | * __GFP_COMP address compound page metadata. | 200 | * __GFP_COMP address compound page metadata. |
202 | * | 201 | * |
203 | * __GFP_ZERO returns a zeroed page on success. | 202 | * __GFP_ZERO returns a zeroed page on success. |
204 | * | ||
205 | * __GFP_NOTRACK avoids tracking with kmemcheck. | ||
206 | * | ||
207 | * __GFP_NOTRACK_FALSE_POSITIVE is an alias of __GFP_NOTRACK. It's a means of | ||
208 | * distinguishing in the source between false positives and allocations that | ||
209 | * cannot be supported (e.g. page tables). | ||
210 | */ | 203 | */ |
211 | #define __GFP_COLD ((__force gfp_t)___GFP_COLD) | 204 | #define __GFP_COLD ((__force gfp_t)___GFP_COLD) |
212 | #define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN) | 205 | #define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN) |
213 | #define __GFP_COMP ((__force gfp_t)___GFP_COMP) | 206 | #define __GFP_COMP ((__force gfp_t)___GFP_COMP) |
214 | #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) | 207 | #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) |
215 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) | ||
216 | #define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK) | ||
217 | 208 | ||
218 | /* Disable lockdep for GFP context tracking */ | 209 | /* Disable lockdep for GFP context tracking */ |
219 | #define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP) | 210 | #define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index ebddfca9e24b..79f6532f8a0b 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -89,12 +89,6 @@ | |||
89 | /* Avoid kmemleak tracing */ | 89 | /* Avoid kmemleak tracing */ |
90 | #define SLAB_NOLEAKTRACE ((slab_flags_t __force)0x00800000U) | 90 | #define SLAB_NOLEAKTRACE ((slab_flags_t __force)0x00800000U) |
91 | 91 | ||
92 | /* Don't track use of uninitialized memory */ | ||
93 | #ifdef CONFIG_KMEMCHECK | ||
94 | # define SLAB_NOTRACK ((slab_flags_t __force)0x01000000U) | ||
95 | #else | ||
96 | # define SLAB_NOTRACK 0 | ||
97 | #endif | ||
98 | /* Fault injection mark */ | 92 | /* Fault injection mark */ |
99 | #ifdef CONFIG_FAILSLAB | 93 | #ifdef CONFIG_FAILSLAB |
100 | # define SLAB_FAILSLAB ((slab_flags_t __force)0x02000000U) | 94 | # define SLAB_FAILSLAB ((slab_flags_t __force)0x02000000U) |
diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h index 648cbf603736..72162f3a03fa 100644 --- a/include/trace/events/mmflags.h +++ b/include/trace/events/mmflags.h | |||
@@ -46,7 +46,6 @@ | |||
46 | {(unsigned long)__GFP_RECLAIMABLE, "__GFP_RECLAIMABLE"}, \ | 46 | {(unsigned long)__GFP_RECLAIMABLE, "__GFP_RECLAIMABLE"}, \ |
47 | {(unsigned long)__GFP_MOVABLE, "__GFP_MOVABLE"}, \ | 47 | {(unsigned long)__GFP_MOVABLE, "__GFP_MOVABLE"}, \ |
48 | {(unsigned long)__GFP_ACCOUNT, "__GFP_ACCOUNT"}, \ | 48 | {(unsigned long)__GFP_ACCOUNT, "__GFP_ACCOUNT"}, \ |
49 | {(unsigned long)__GFP_NOTRACK, "__GFP_NOTRACK"}, \ | ||
50 | {(unsigned long)__GFP_WRITE, "__GFP_WRITE"}, \ | 49 | {(unsigned long)__GFP_WRITE, "__GFP_WRITE"}, \ |
51 | {(unsigned long)__GFP_RECLAIM, "__GFP_RECLAIM"}, \ | 50 | {(unsigned long)__GFP_RECLAIM, "__GFP_RECLAIM"}, \ |
52 | {(unsigned long)__GFP_DIRECT_RECLAIM, "__GFP_DIRECT_RECLAIM"},\ | 51 | {(unsigned long)__GFP_DIRECT_RECLAIM, "__GFP_DIRECT_RECLAIM"},\ |
@@ -5635,8 +5635,6 @@ static char *create_unique_id(struct kmem_cache *s) | |||
5635 | *p++ = 'a'; | 5635 | *p++ = 'a'; |
5636 | if (s->flags & SLAB_CONSISTENCY_CHECKS) | 5636 | if (s->flags & SLAB_CONSISTENCY_CHECKS) |
5637 | *p++ = 'F'; | 5637 | *p++ = 'F'; |
5638 | if (!(s->flags & SLAB_NOTRACK)) | ||
5639 | *p++ = 't'; | ||
5640 | if (s->flags & SLAB_ACCOUNT) | 5638 | if (s->flags & SLAB_ACCOUNT) |
5641 | *p++ = 'A'; | 5639 | *p++ = 'A'; |
5642 | if (p != name + 1) | 5640 | if (p != name + 1) |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 557d391f564a..cbf70738ef5f 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -655,7 +655,6 @@ static const struct { | |||
655 | { "__GFP_RECLAIMABLE", "RC" }, | 655 | { "__GFP_RECLAIMABLE", "RC" }, |
656 | { "__GFP_MOVABLE", "M" }, | 656 | { "__GFP_MOVABLE", "M" }, |
657 | { "__GFP_ACCOUNT", "AC" }, | 657 | { "__GFP_ACCOUNT", "AC" }, |
658 | { "__GFP_NOTRACK", "NT" }, | ||
659 | { "__GFP_WRITE", "WR" }, | 658 | { "__GFP_WRITE", "WR" }, |
660 | { "__GFP_RECLAIM", "R" }, | 659 | { "__GFP_RECLAIM", "R" }, |
661 | { "__GFP_DIRECT_RECLAIM", "DR" }, | 660 | { "__GFP_DIRECT_RECLAIM", "DR" }, |