lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 18 Feb 2015 23:53:47 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Slava Pestov <sp@...era.io>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, Slava Pestov <sp@...erainc.com>
Subject: Re: [PATCH] taint on lockdep warning with new TAINT_LOCKDEP


* Slava Pestov <sp@...era.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@...erainc.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ