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] [day] [month] [year] [list]
Message-ID: <CAE9FiQWJfc=c9zVyFcj9HLBRCkYaJD8UzggjdiJ9oU1mSEzBBw@mail.gmail.com>
Date:	Mon, 14 Oct 2013 11:41:30 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Greg KH <gregkh@...uxfoundation.org>, Kay Sievers <kay@...y.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH driver-core-next] sysfs: make sysfs_file_ops() follow
 ignore_lockdep flag

On Mon, Oct 14, 2013 at 6:27 AM, Tejun Heo <tj@...nel.org> wrote:
> 375b611e60 ("sysfs: remove sysfs_buffer->ops") introduced
> sysfs_file_ops() which determines the associated file operation of a
> given sysfs_dirent.  As file ops access should be protected by an
> active reference, the new function includes a lockdep assertion on the
> sysfs_dirent; unfortunately, I forgot to take attr->ignore_lockdep
> flag into account and the lockdep assertion trips spuriously for files
> which opt out from active reference lockdep checking.
>
> # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/authorized
>
>  ------------[ cut here ]------------
>  WARNING: CPU: 1 PID: 540 at /work/os/work/fs/sysfs/file.c:79 sysfs_file_ops+0x4e/0x60()
>  Modules linked in:
>  CPU: 1 PID: 540 Comm: cat Not tainted 3.11.0-work+ #3
>  Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
>   0000000000000009 ffff880016205c08 ffffffff81ca0131 0000000000000000
>   ffff880016205c40 ffffffff81096d0d ffff8800166cb898 ffff8800166f6f60
>   ffffffff8125a220 ffff880011ab1ec0 ffff88000aff0c78 ffff880016205c50
>  Call Trace:
>   [<ffffffff81ca0131>] dump_stack+0x4e/0x82
>   [<ffffffff81096d0d>] warn_slowpath_common+0x7d/0xa0
>   [<ffffffff81096dea>] warn_slowpath_null+0x1a/0x20
>   [<ffffffff8125994e>] sysfs_file_ops+0x4e/0x60
>   [<ffffffff8125a274>] sysfs_open_file+0x54/0x300
>   [<ffffffff811df612>] do_dentry_open.isra.17+0x182/0x280
>   [<ffffffff811df820>] finish_open+0x30/0x40
>   [<ffffffff811f0623>] do_last+0x503/0xd90
>   [<ffffffff811f0f6b>] path_openat+0xbb/0x6d0
>   [<ffffffff811f23ba>] do_filp_open+0x3a/0x90
>   [<ffffffff811e09a9>] do_sys_open+0x129/0x220
>   [<ffffffff811e0abe>] SyS_open+0x1e/0x20
>   [<ffffffff81caf3c2>] system_call_fastpath+0x16/0x1b
>  ---[ end trace aa48096b111dafdb ]---
>
> Rename fs/sysfs/dir.c::ignore_lockdep() to sysfs_ignore_lockdep() and
> move it to fs/sysfs/sysfs.h and make sysfs_file_ops() skip lockdep
> assertion if sysfs_ignore_lockdep() is true.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reported-by: Yinghai Lu <yinghai@...nel.org>

Tested-by: Yinghai Lu <yinghai@...nel.org>
--
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