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-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1605301234310.3639@nanos>
Date:	Mon, 30 May 2016 12:35:52 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Hans Ulli Kroll <ulli.kroll@...glemail.com>
cc:	linux-kernel@...r.kernel.org,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	stable@...r.kernel.org
Subject: Re: [PATCH] clocksource:fix kernel panic due missing event_handler
 in cs5535

On Mon, 30 May 2016, Hans Ulli Kroll wrote:

> Missing event_handler in mfgpt_tick() caused a kernel panic.

So the real problem is that the interrupt in the device is enabled _BEFORE_
the clock event device is registered.
 
> diff --git a/drivers/clocksource/cs5535-clockevt.c b/drivers/clocksource/cs5535-clockevt.c
> index 9a7e37c..6f186cf 100644
> --- a/drivers/clocksource/cs5535-clockevt.c
> +++ b/drivers/clocksource/cs5535-clockevt.c
> @@ -129,7 +129,9 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
>  		cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP,
>  				MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
>  
> -	cs5535_clockevent.event_handler(&cs5535_clockevent);
> +	if (cs5535_clockevent.event_handler)
> +		cs5535_clockevent.event_handler(&cs5535_clockevent);
> +

So what about fixing the above problem instead of having a conditional in the
interrupt handler fast path?

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ