[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160307121143.0ffc3eb1@gandalf.local.home>
Date: Mon, 7 Mar 2016 12:11:43 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Sedat Dilek <sedat.dilek@...il.com>,
Jiri Kosina <jikos@...nel.org>, Tejun Heo <tj@...nel.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Andy Lutomirski <luto@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] usbhid: Fix lockdep unannotated irqs-off warning
On Mon, 7 Mar 2016 11:41:37 -0500 (EST)
Alan Stern <stern@...land.harvard.edu> wrote:
> It's hard to call this a compiler bug, but perhaps it is -- I don't
> know how programmers are supposed to tell CLANG that a subroutine
> modifies the Interrupt Flag in a way that the compiler shouldn't mess
> up.
I would state that this is a compiler bug for any kernel development.
Because it's modifying a global variable (IF) that can be modified by
asm(). Clang is assuming that this is userspace where IF can't change.
But because this is kernel space, the IF can (and does here), which
makes this "feature" incompatible with any (Linux or otherwise) kernel
programming.
-- Steve
Powered by blists - more mailing lists