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]
Date:	Sat, 28 May 2016 08:45:15 -0300
From:	Henrique de Moraes Holschuh <hmh@....eng.br>
To:	Scot Doyle <lkml14@...tdoyle.com>
Cc:	Tomi Valkeinen <tomi.valkeinen@...com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	David Daney <david.daney@...ium.com>,
	Ming Lei <ming.lei@...onical.com>,
	Dann Frazier <dann.frazier@...onical.com>,
	Jeremy Kerr <jk@...abs.org>,
	Peter Hurley <peter@...leysoftware.com>,
	Pavel Machek <pavel@....cz>, Jonathan Liu <net147@...il.com>,
	Alistair Popple <alistair@...ple.id.au>,
	Jean-Philippe Brucker <jean-philippe.brucker@....com>,
	"Chintakuntla, Radha" <Radha.Chintakuntla@...iumnetworks.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.com>, David Airlie <airlied@...ux.ie>,
	ddaney.cavm@...il.com, dri-devel@...ts.freedesktop.org,
	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] fbcon: warn on invalid cursor blink intervals

On Thu, 19 May 2016, Scot Doyle wrote:
> Two systems are locking on boot [1] because ops->cur_blink_jiffies
> is set to zero from vc->vc_cur_blink_ms.
> 
> Ignore such invalid intervals and log a warning.
> 
> [1] https://bugs.launchpad.net/bugs/1574814
> 
> Suggested-by: David Daney <david.daney@...ium.com>
> Signed-off-by: Scot Doyle <lkml14@...tdoyle.com>
> Cc: <stable@...r.kernel.org> [v4.2]

FWIW:
Tested-by: Henrique de Moraes Holschuh <hmh@....eng.br> on top of 4.4.11.

And nothing caused it to issue warnings here, so far (with the other
recommended patch applied first).

> ---
>  drivers/video/console/fbcon.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> index 6e92917..fad5b89 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -1095,7 +1095,13 @@ static void fbcon_init(struct vc_data *vc, int init)
>  		con_copy_unimap(vc, svc);
>  
>  	ops = info->fbcon_par;
> -	ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +
> +	if (vc->vc_cur_blink_ms >= 50)
> +		ops->cur_blink_jiffies =
> +		    msecs_to_jiffies(vc->vc_cur_blink_ms);
> +	else
> +		WARN_ONCE(1, "blink interval < 50 ms");
> +
>  	p->con_rotate = initial_rotation;
>  	set_blitting_type(vc, info);
>  
> @@ -1309,7 +1315,11 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
>  	int y;
>   	int c = scr_readw((u16 *) vc->vc_pos);
>  
> -	ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
> +	if (vc->vc_cur_blink_ms >= 50)
> +		ops->cur_blink_jiffies =
> +		    msecs_to_jiffies(vc->vc_cur_blink_ms);
> +	else
> +		WARN_ONCE(1, "blink interval < 50 ms");
>  
>  	if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
>  		return;

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ