Taint kernel when we detect a corrupted slab.
Subsystems (2)
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page'
mm/slub.c +2 -0
@@ -568,6 +568,8 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)printk (KERN_ERR "BUG %s (%s): %s\n" , s->name,print_tainted (), buf);printk (KERN_ERR "----------------------------------------" "-------------------------------------\n\n" ); + +add_taint (TAINT_BAD_PAGE ); }static void slab_fix (struct kmem_cache *s,char *fmt, ...)
Christoph Lameter
Acked-byQuoted 2 lines · Dave Jones
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page'
David Rientjes
reviewerQuoted 6 lines · Christoph Lameter
Quoted 2 lines · Dave Jones
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page'
[Fixing Pekka's email address]
Dave, would you like to add something similar to __slab_error() for CONFIG_SLAB?
Quoted 7 lines · David Rientjes
Quoted 5 lines · Christoph Lameter
Quoted 2 lines · Dave Jones
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page'
Quoted 6 lines
Quoted 1 line
[Fixing Pekka's email address]
Dave, would you like to add something similar to
__slab_error()forCONFIG_SLAB?
Sure. This ?
Dave
Signature · 6 lines
Taint kernel when we detect a corrupted slab. It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page' Signed-off-by: Dave Jones <[email protected]>
mm/slub.c +2 -0
@@ -568,6 +568,8 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)printk (KERN_ERR "BUG %s (%s): %s\n" , s->name,print_tainted (), buf);printk (KERN_ERR "----------------------------------------" "-------------------------------------\n\n" ); + +add_taint (TAINT_BAD_PAGE ); }static void slab_fix (struct kmem_cache *s,char *fmt, ...)
mm/slab.c +1 -0
@@ -818,6 +818,7 @@ static void __slab_error(const char *function, struct kmem_cache *cachep,printk (KERN_ERR "slab error in %s(): cache `%s': %s\n" , function, cachep->name, msg);dump_stack (); +add_taint (TAINT_BAD_PAGE ); }/*
Quoted 4 lines · Dave Jones
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page'
Signed-off-by Dave Jones <[email protected]>
Pekka Enberg
AppliedQuoted 4 lines · Dave Jones
Quoted 4 lines
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page'
Signed-off-by Dave Jones <[email protected]>
Quoted 1 line · David Rientjes
Acked-by David Rientjes <[email protected]>
Applied, thanks!