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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180712093049.692ad3bd@gandalf.local.home>
Date:   Thu, 12 Jul 2018 09:30:49 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Linux Fbdev development list <linux-fbdev@...r.kernel.org>
Subject: Re: [PATCH v2] console: Replace #if 1 with a bool to ignore

On Thu, 12 Jul 2018 09:29:38 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> From: Steven Rostedt (VMware) <rostedt@...dmis.org>
> 
> There's been discussion on the fb list about the addition of
> WARN_CONSOLE_UNLOCKED() inside the fb code. The complaint is that when
> the fb module is loaded with lockless_register_fb the console lock is
> not taken for debugging reasons. With the addition of
> WARN_CONSOLE_UNLOCK() within the fb code, this causes the console to
> fill up with warnings when trying to debug the fb driver.
> 
> There's also a #if 1 that enables the warning which was added before
> git history, and we look down on constant #if's in the kernel nowadays
> anyway.
> 
> Remove the #if 1 and add a ignore_console_lock_warning boolean that can
> be set by drivers to ignore the warning in order to do debugging.
> 
> Link: http://lkml.kernel.org/r/717e6337-e7a6-7a92-1c1b-8929a25696b5@suse.de
> Reviewed-by: Hans de Goede <hdegoede@...hat.com>
> Acked-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>

Petr,

If you want this to go by way of fbdev tree, then can you Ack it?

-- Steve

> ---
> Changes since V1:
>  - Added comment to describe ignore_console_unlock_waring variable
>  - Abide by 80 character limit
> 
> Index: linux-trace.git/include/linux/console.h
> ===================================================================
> --- linux-trace.git.orig/include/linux/console.h
> +++ linux-trace.git/include/linux/console.h
> @@ -200,11 +200,14 @@ void vcs_make_sysfs(int index);
>  void vcs_remove_sysfs(int index);
>  
>  /* Some debug stub to catch some of the obvious races in the VT code */
> -#if 1
> -#define WARN_CONSOLE_UNLOCKED()	WARN_ON(!is_console_locked() && !oops_in_progress)
> -#else
> -#define WARN_CONSOLE_UNLOCKED()
> -#endif
> +#define WARN_CONSOLE_UNLOCKED()						\
> +	WARN_ON(!ignore_console_lock_warning &&				\
> +		!is_console_locked() && !oops_in_progress)
> +/*
> + * Set ignore_console_lock_warning to true if you need to quiet
> + * WARN_CONSOLE_UNLOCKED() for debugging purposes.
> + */
> +extern bool ignore_console_lock_warning;
>  
>  /* VESA Blanking Levels */
>  #define VESA_NO_BLANKING        0
> Index: linux-trace.git/kernel/printk/printk.c
> ===================================================================
> --- linux-trace.git.orig/kernel/printk/printk.c
> +++ linux-trace.git/kernel/printk/printk.c
> @@ -66,6 +66,9 @@ int console_printk[4] = {
>  	CONSOLE_LOGLEVEL_DEFAULT,	/* default_console_loglevel */
>  };
>  
> +bool ignore_console_lock_warning __read_mostly;
> +EXPORT_SYMBOL(ignore_console_lock_warning);
> +
>  /*
>   * Low level drivers may need that to know if they can schedule in
>   * their unblank() callback or not. So let's export it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ