From: Ingo Molnar <mingo@kernel.org>
To: Slava Pestov <sp@datera.io>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, Slava Pestov <sp@daterainc.com>
Subject: Re: [PATCH] taint on lockdep warning with new TAINT_LOCKDEP
Date: Wed, 18 Feb 2015 23:53:47 +0100 [thread overview]
Message-ID: <20150218225347.GA31816@gmail.com> (raw)
In-Reply-To: <1422568226-18449-1-git-send-email-sp@daterainc.com>
* Slava Pestov <sp@datera.io> wrote:
> This helps when writing automated tests, since they can fail the
> test if the kernel was tainted instead of manually scraping dmesg
> for interesting strings.
>
> Signed-off-by: Slava Pestov <sp@daterainc.com>
> ---
> include/linux/kernel.h | 1 +
> kernel/locking/lockdep.c | 31 +++++++++++++++++++++++++++++++
> kernel/panic.c | 2 ++
> 3 files changed, 34 insertions(+)
>
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index 5449d2f..c46e24e 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -471,6 +471,7 @@ extern enum system_states {
> #define TAINT_OOT_MODULE 12
> #define TAINT_UNSIGNED_MODULE 13
> #define TAINT_SOFTLOCKUP 14
> +#define TAINT_LOCKDEP 15
>
> extern const char hex_asc[];
> #define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 88d0d44..4916a32 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -382,6 +382,8 @@ static unsigned long stack_trace[MAX_STACK_TRACE_ENTRIES];
>
> static void print_lockdep_off(const char *bug_msg)
> {
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
>
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
> + add_taint(TAINT_LOCKDEP, LOCKDEP_NOW_UNRELIABLE);
If only we had a function that turns lockdep off in a
single place, instead of having to crap all over lockdep.c?
;-)
Thanks,
Ingo
next prev parent reply other threads:[~2015-02-18 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 21:50 [PATCH] taint on lockdep warning with new TAINT_LOCKDEP Slava Pestov
2015-01-30 23:44 ` Andrew Morton
2015-02-18 22:53 ` Ingo Molnar [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-27 23:52 Slava Pestov
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=20150218225347.GA31816@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sp@datera.io \
--cc=sp@daterainc.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.