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:	Sun, 6 Mar 2016 09:51:47 +0100
From:	Sedat Dilek <sedat.dilek@...il.com>
To:	Alan Stern <stern@...land.harvard.edu>,
	Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <peterz@...radead.org>
Cc:	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>,
	Ingo Molnar <mingo@...hat.com>, PaX <pageexec@...email.hu>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] usbhid: Fix lockdep unannotated irqs-off warning

On Sat, Mar 5, 2016 at 11:30 PM, Sedat Dilek <sedat.dilek@...il.com> wrote:
> On Fri, Mar 4, 2016 at 5:04 PM, Alan Stern <stern@...land.harvard.edu> wrote:
>> On Wed, 2 Mar 2016, Sedat Dilek wrote:
>>
>>> On 3/1/16, Alan Stern <stern@...land.harvard.edu> wrote:
>>> > On Tue, 1 Mar 2016, Sedat Dilek wrote:
>>> >
>>> >> On Tue, Oct 13, 2015 at 2:57 AM, Steven Rostedt <rostedt@...dmis.org>
>>> >> wrote:
>>> >> > On Sat, 3 Oct 2015 12:05:42 +0200
>>> >> > Sedat Dilek <sedat.dilek@...il.com> wrote:
>>> >> >
>>> >> >> So, at the beginning... dunno WTF is causing the problems - no
>>> >> >> workaround for CLANG.
>>> >> >
>>> >> > Probably need to compile with gcc and with clang and look at the binary
>>> >> > differences. Or at least what objdump shows.
>>> >> >
>>> >>
>>> >> [ Hope to address this issue to the correct people - CCed some people
>>> >> I taped on their nerves ]
>>> >>
>>> >> Not sure if I should open a new thread?
>>> >> Please, some clear statements on this.
>>> >> Thanks.
>>> >>
>>> >> The issue is still visible and alive.
>>
>> I think it would be worthwhile to doublecheck the time at which
>> interrupts get disabled.  Sedat, please try your plug/unplug the USB
>> mouse test with the patch below.
>>
>> Alan Stern
>>
>>
>>
>> Index: usb-4.4/drivers/hid/usbhid/hid-core.c
>> ===================================================================
>> --- usb-4.4.orig/drivers/hid/usbhid/hid-core.c
>> +++ usb-4.4/drivers/hid/usbhid/hid-core.c
>> @@ -1393,8 +1393,11 @@ static void usbhid_disconnect(struct usb
>>
>>  static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid)
>>  {
>> +       if (raw_irqs_disabled())  pr_info("usbhid irqs disabled A\n");
>>         del_timer_sync(&usbhid->io_retry);
>> +       if (raw_irqs_disabled())  pr_info("usbhid irqs disabled B\n");
>>         cancel_work_sync(&usbhid->reset_work);
>> +       if (raw_irqs_disabled())  pr_info("usbhid irqs disabled C\n");
>>  }
>>
>>  static void hid_cease_io(struct usbhid_device *usbhid)
>>
>
> With your patch I get the dmesg attached.
>

[ CC PaX and David Woodhouse ]

I remembered that CONFIG_FTRACE is not working correct (details see
[1] as explained by PaX).
Thus I disabled it (see 4.4.4-2-llvmlinux-amd64).
That 'mcount' bogus lines are gone.

In a 2nd test-build I turned off CONFIG_PROVE_LOCKING en-plus as it
enables CONFIG_TRACE_IRQFLAGS (4.4.4-4-llvmlinux-amd64).

The call-traces when booting and/or un-/re-plugging my USB-mouse are
still alive in all built clang-compiled Linux-kernels.

dmesg-output for -4 kernel is attached, it includes the usbhid
test-patch from Alan Stern (plus some other CC:stable fixes against
Linux v4.4.4).

Hope this helps.

- Sedat -

[1] https://lists.linuxfoundation.org/pipermail/llvmlinux/2013-July/000429.html
[2] http://cateee.net/lkddb/web-lkddb/FTRACE.html
[3] http://cateee.net/lkddb/web-lkddb/TRACE_IRQFLAGS.html
[4] http://cateee.net/lkddb/web-lkddb/PROVE_LOCKING.html
[5] http://cateee.net/lkddb/web-lkddb/TRACE_IRQFLAGS_SUPPORT.html

View attachment "objdump-D_vmlinux_del_timer_sync_4.4.4-2-llvmlinux-amd64.txt" of type "text/plain" (3923 bytes)

Download attachment "config-4.4.4-2-llvmlinux-amd64" of type "application/octet-stream" (128654 bytes)

Download attachment "config-4.4.4-4-llvmlinux-amd64" of type "application/octet-stream" (128611 bytes)

View attachment "objdump-D_vmlinux_del_timer_sync_4.4.4-4-llvmlinux-amd64.txt" of type "text/plain" (3042 bytes)

View attachment "dmesg_4.4.4-4-llvmlinux-amd64_usbmouse-unplugged-and-replugged.txt" of type "text/plain" (75748 bytes)

View attachment "4.4.4-4-llvmlinux-amd64.patch" of type "text/x-patch" (32403 bytes)

Powered by blists - more mailing lists