Skip to content

Commit d8be756

Browse files
Levin, Alexander (Sasha Levin)torvalds
authored andcommitted
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>
1 parent 75f296d commit d8be756

File tree

7 files changed

+0
-37
lines changed

7 files changed

+0
-37
lines changed

arch/x86/include/asm/pgtable.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,6 @@ static inline bool pte_accessible(struct mm_struct *mm, pte_t a)
667667
return false;
668668
}
669669

670-
static inline int pte_hidden(pte_t pte)
671-
{
672-
return pte_flags(pte) & _PAGE_HIDDEN;
673-
}
674-
675670
static inline int pmd_present(pmd_t pmd)
676671
{
677672
/*

arch/x86/include/asm/pgtable_types.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
#define _PAGE_BIT_SPECIAL _PAGE_BIT_SOFTW1
3434
#define _PAGE_BIT_CPA_TEST _PAGE_BIT_SOFTW1
35-
#define _PAGE_BIT_HIDDEN _PAGE_BIT_SOFTW3 /* hidden by kmemcheck */
3635
#define _PAGE_BIT_SOFT_DIRTY _PAGE_BIT_SOFTW3 /* software dirty tracking */
3736
#define _PAGE_BIT_DEVMAP _PAGE_BIT_SOFTW4
3837

@@ -79,18 +78,6 @@
7978
#define _PAGE_KNL_ERRATUM_MASK 0
8079
#endif
8180

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-
9481
#ifdef CONFIG_MEM_SOFT_DIRTY
9582
#define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_SOFT_DIRTY)
9683
#else

include/linux/gfp.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ struct vm_area_struct;
3737
#define ___GFP_THISNODE 0x40000u
3838
#define ___GFP_ATOMIC 0x80000u
3939
#define ___GFP_ACCOUNT 0x100000u
40-
#define ___GFP_NOTRACK 0x200000u
4140
#define ___GFP_DIRECT_RECLAIM 0x400000u
4241
#define ___GFP_WRITE 0x800000u
4342
#define ___GFP_KSWAPD_RECLAIM 0x1000000u
@@ -201,19 +200,11 @@ struct vm_area_struct;
201200
* __GFP_COMP address compound page metadata.
202201
*
203202
* __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).
210203
*/
211204
#define __GFP_COLD ((__force gfp_t)___GFP_COLD)
212205
#define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN)
213206
#define __GFP_COMP ((__force gfp_t)___GFP_COMP)
214207
#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)
217208

218209
/* Disable lockdep for GFP context tracking */
219210
#define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP)

include/linux/slab.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@
8989
/* Avoid kmemleak tracing */
9090
#define SLAB_NOLEAKTRACE ((slab_flags_t __force)0x00800000U)
9191

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
9892
/* Fault injection mark */
9993
#ifdef CONFIG_FAILSLAB
10094
# define SLAB_FAILSLAB ((slab_flags_t __force)0x02000000U)

include/trace/events/mmflags.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
{(unsigned long)__GFP_RECLAIMABLE, "__GFP_RECLAIMABLE"}, \
4747
{(unsigned long)__GFP_MOVABLE, "__GFP_MOVABLE"}, \
4848
{(unsigned long)__GFP_ACCOUNT, "__GFP_ACCOUNT"}, \
49-
{(unsigned long)__GFP_NOTRACK, "__GFP_NOTRACK"}, \
5049
{(unsigned long)__GFP_WRITE, "__GFP_WRITE"}, \
5150
{(unsigned long)__GFP_RECLAIM, "__GFP_RECLAIM"}, \
5251
{(unsigned long)__GFP_DIRECT_RECLAIM, "__GFP_DIRECT_RECLAIM"},\

mm/slub.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5635,8 +5635,6 @@ static char *create_unique_id(struct kmem_cache *s)
56355635
*p++ = 'a';
56365636
if (s->flags & SLAB_CONSISTENCY_CHECKS)
56375637
*p++ = 'F';
5638-
if (!(s->flags & SLAB_NOTRACK))
5639-
*p++ = 't';
56405638
if (s->flags & SLAB_ACCOUNT)
56415639
*p++ = 'A';
56425640
if (p != name + 1)

tools/perf/builtin-kmem.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ static const struct {
655655
{ "__GFP_RECLAIMABLE", "RC" },
656656
{ "__GFP_MOVABLE", "M" },
657657
{ "__GFP_ACCOUNT", "AC" },
658-
{ "__GFP_NOTRACK", "NT" },
659658
{ "__GFP_WRITE", "WR" },
660659
{ "__GFP_RECLAIM", "R" },
661660
{ "__GFP_DIRECT_RECLAIM", "DR" },

0 commit comments

Comments
 (0)