From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, Alexander Potapenko <glider@google.com>,
Dmitriy Vyukov <dvyukov@google.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: [PATCH] kasan: always taint kernel on report.
Date: Wed, 21 Oct 2015 19:28:58 +0300 [thread overview]
Message-ID: <1445444938-28018-1-git-send-email-aryabinin@virtuozzo.com> (raw)
Currently we already taint the kernel in some cases.
E.g. if we hit some bug in slub memory we call object_err()
which will taint the kernel with TAINT_BAD_PAGE flag.
But for other kind of bugs kernel left untainted.
Always taint with TAINT_BAD_PAGE if kasan found some bug.
This is useful for automated testing.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
mm/kasan/report.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index f5e068a..12f222d 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -238,6 +238,7 @@ static void kasan_report_error(struct kasan_access_info *info)
}
pr_err("================================="
"=================================\n");
+ add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
spin_unlock_irqrestore(&report_lock, flags);
kasan_enable_current();
}
--
2.4.10
--
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>
next reply other threads:[~2015-10-21 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 16:28 Andrey Ryabinin [this message]
2015-10-22 10:15 ` Dmitry Vyukov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445444938-28018-1-git-send-email-aryabinin@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox