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: <20090423.235141.61509229.anemo@mba.ocn.ne.jp>
Date:	Thu, 23 Apr 2009 23:51:41 +0900 (JST)
From:	Atsushi Nemoto <anemo@....ocn.ne.jp>
To:	alessandro.zummo@...ertech.it
Cc:	akpm@...ux-foundation.org, rtc-linux@...glegroups.com,
	linux-kernel@...r.kernel.org, hcegtvedt@...el.com,
	vapier@...too.org, rongkai.zhan@...driver.com,
	balajirrao@...nmoko.org, david-b@...bell.net,
	broonie@...nsource.wolfsonmicro.com
Subject: Re: [PATCH] rtc: Make rtc_update_irq callable with irqs enabled

[Add CCs to authers or original committers of each mentioned driver]

On Fri, 10 Apr 2009 00:58:20 +0200, Alessandro Zummo <alessandro.zummo@...ertech.it> wrote:
> On Thu, 9 Apr 2009 15:39:21 -0700
> Andrew Morton <akpm@...ux-foundation.org> wrote:
> 
> > > The rtc_update_irq() might be called with irqs enabled, if a interrupt
> > > handler was registered without IRQF_DISABLED.  
> > 
> > Why?  What are the consequences of not merging the patch?  Is it a
> > bugfix?  If so, what are the user-visible effects of the bug?
> 
>  rtc_update_irq() is called by a driver, and a driver
>  is supposed to know when it's doing the call.
> 
>  The driver can either use IRQF_DISABLED or disable the
>  interrupts in some other ways. 
> 
>  I also suspect this is some legacy we are carrying on, 
>  so it's better to leave the decision on the interrupt
>  handling to the driver itself.
> 
>  Unless I'm missing something.

Then here is list of (potentialy) broken rtc drivers:

rtc-at32ap700x.c
rtc-bfin.c
rtc-m48t59.c
rtc-pcf50633.c
rtc-twl4030.c
rtc-wm8350.c

I'm not sure there are any real problem on these drivers.  It seems
IRQF_DISABLED would be suitable for at32ap700x, bfin and m48t59, and
local_irq_disable would be suitable for others.

The IRQF_DISABLED fixes would be better regardless of the
rtc_update_irq() API change.  And local_irq_disable fixes are not
needed (and should be reverted) if the API change was acked, but no
harm for short term fix.

Note that just adding IRQF_DISABLED will cause "IRQF_DISABLED is not
guaranteed on shared IRQs" warning.  So you should consider of
removing IRQF_SHARED, or finding other way.

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