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:	Thu, 3 Jun 2010 15:30:16 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	TAMUKI Shoichi <tamuki@...et.gr.jp>
Cc:	Ingo Molnar <mingo@...e.hu>, Anton Blanchard <anton@...ba.org>,
	Andi Kleen <andi@...stfloor.org>,
	Andy Green <andy@...mcat.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] panic: keep blinking in spite of long spin timer
 mode

On Fri, 04 Jun 2010 07:01:16 +0900
TAMUKI Shoichi <tamuki@...et.gr.jp> wrote:

> To keep panic_timeout accuracy when running under a hypervisor, the
> current implementation only spins on long time (1 second) calls to
> mdelay.  That brings a good effect, but the problem is the keyboard
> LEDs don't blink at all on that situation.
> 
> This patch changes to call to panic_blink_enter() between every mdelay
> and keeps blinking in spite of long spin timer mode.
> 
> The default time to call to mdelay is 1ms.  If the speed of blinking
> is slow enough, the time to call to mdelay will be automatically
> switched to longer.  This is suitable when running under a hypervisor.
> 
> ...
> 
>  Documentation/kernel-parameters.txt |    8 +-
>  arch/arm/mach-s3c2440/mach-gta02.c  |   17 +----
>  drivers/input/serio/i8042.c         |   25 +-------
>  include/linux/kernel.h              |    2 
>  kernel/panic.c                      |   77 +++++++++++++++++---------
>  5 files changed, 67 insertions(+), 62 deletions(-)

It cleans up the led-blinking implementations nicely.  That's good.

> 
> ...
>
> +	panicblink=	[KNL] The speed of panic blink (default is 12 wpm)
> +			The period of panic blink can be computed by the
> +			formula T = 7200 / W, where T is the period in milli-
> +			seconds, W is the speed in wpm (words per minute).
> +			Should be 5 or less when running under a hypervisor

Nobody will know what "wpm" means.  What is a "word" in this context? 
Unclear.

How about "bpm": "blinks per minute".  That's nice and direct.

>
> ...
>
>  
> +	if (panic_blink_wpm <= 0 || panic_blink_wpm > 100)
> +		panic_blink_wpm = 12;

hm, OK.  Or we could do

	if (panic_blink_wpm <= 0)
		panic_blink_wpm = 1;
	if (panic_blink_wpm > 100)
		panic_blink_wpm = 100;

which is handily encapsulated in the clamp() macro which nobody uses.

> +	if (!panic_blink)
> +		panic_blink = no_blink;

Can we initialise panic_blink to no_blink at compile-time then remove this?

>
> ...
>

--
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