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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD3Xx4L6T0_MFjC+7OwgaB40kn7wZX-RAMNWi5WOjJ9z+ZV46g@mail.gmail.com>
Date:	Mon, 9 Mar 2015 09:41:18 +0100
From:	Valentin Rothberg <valentinrothberg@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Hannes Reinecke <hare@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jonathan Corbet <corbet@....net>,
	Ralf Baechle <ralf@...ux-mips.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Paul Bolle <pebolle@...cali.nl>, Jiri Kosina <jkosina@...e.cz>,
	Ewan Milne <emilne@...hat.com>, Christoph Hellwig <hch@....de>,
	Huacai Chen <chenhc@...ote.com>,
	Hongliang Tao <taohl@...ote.com>, Nishanth Menon <nm@...com>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Peter Ujfalusi <peter.ujfalusi@...com>,
	Tony Lindgren <tony@...mide.com>,
	Rajendra Nayak <rnayak@...com>,
	Sricharan R <r.sricharan@...com>,
	Afzal Mohammed <afzal@...com>, Keerthy <j-keerthy@...com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Zhou Wang <wangzhou1@...ilicon.com>,
	Felipe Balbi <balbi@...com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Randy Dunlap <rdunlap@...radead.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Quentin Lambert <lambert.quentin@...il.com>,
	Eyal Perry <eyalpe@...lanox.com>,
	Arnd Bergmann <arnd@...db.de>,
	Peter Zijlstra <peterz@...radead.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
	iss_storagedev@...com, linux-mtd@...ts.infradead.org,
	linux-usb@...r.kernel.org
Subject: Re: [PATCH] Remove deprecated IRQF_DISABLED flag entirely

On Fri, Mar 6, 2015 at 8:41 PM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> On Thu, Mar 5, 2015 at 5:11 AM, Hannes Reinecke <hare@...e.de> wrote:
>> On 03/05/2015 01:59 PM, Valentin Rothberg wrote:
>>> The IRQF_DISABLED is a NOOP and has been scheduled for removal since
>>> Linux v2.6.36 by commit 6932bf37bed4 ("genirq: Remove IRQF_DISABLED from
>>> core code").
>>>
>>> According to commit e58aa3d2d0cc ("genirq: Run irq handlers with
>>> interrupts disabled") running IRQ handlers with interrupts enabled can
>>> cause stack overflows when the interrupt line of the issuing device is
>>> still active.
>>>
>>> This patch ends the grace period for IRQF_DISABLED (i.e., SA_INTERRUPT
>>> in older versions of Linux) and removes the definition and all remaining
>>> usages of this flag.
>>>
>>> Signed-off-by: Valentin Rothberg <valentinrothberg@...il.com>
>>> ---
>>> The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
>>> as IRQF_DISABLED is gone now; the usage in older kernel versions
>>> (including the old SA_INTERRUPT flag) should be discouraged.  The
>>> trouble of using IRQF_SHARED is a general problem and not specific to
>>> any driver.
>>>
>>> I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
>>> it has already been removed in linux-next by commit b0e1ee8e1405
>>> ("MSI-HOWTO.txt: remove reference on IRQF_DISABLED").
>>>
>>> All remaining references are changelogs that I suggest to keep.
>>
>> While you're at it: having '0x0' as a value for the irq flags looks
>> a bit silly, and makes you wonder what the parameter is for.
>>
>> I would rather like to have
>>
>> #define IRQF_NONE 0x0
>>
>> and use it for these cases.
>> That way the scope of that parameter is clear.
>
> No, that would imply that IRQ never triggers whereas passing 0 means
> we keep triggers that have been set by the platform.

Are you against introducing a new flag or just don't like 'IRQF_NONE'?
 I think that passing 0 could mean anything when one does not know the
semantics.  Combining yours and Hannes' proposal could look like this:

#define IRQF_PLAT 0x0 - keep triggers that have been set by the platform

I wrote a Coccinelle script to check for such 0-flags and find 758
cases in current Linus' mainline.  The script only checks function
calls to {devm_}request_{threaded_}IRQ() but does not find flags
passed to wrapper functions or flags that are stored in a struct etc.

Kind regards,
 Valentin
--
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