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:	Thu, 19 Sep 2013 12:03:08 -0500
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Tejun Heo <tj@...nel.org>
Cc:	gregkh@...uxfoundation.org, kay@...y.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHSET] sysfs: implement sysfs_remove()


I am running from memory right now.  But the short version is.

Al Viro has complained about the sysfs removal antics of sysfs, and
I have seen Al get confused and "fix" filesystems that depart too far
from normal filesystem semantics.

I have gone down this path both ways and "rm -rf" semantics are horrible
and cause real bugs in the kernel at the boundaries between devices.
"rm -rf" semantics are also horrible because no sanity checks can be
performed.

Normal "unlink/rmdir" semantics are absolutely achievable including
not allowing children to be removed before their parents with just
a few bug fixes to the kernel.  I ran out of energy before I could
track down and make those bug fixes which is why things are left
in the current state.  And now we don't need any more boiler plate
to get there, the current primary interfaces to sysfs remember all of
the filenames.

The fact we actually need to allow parents to be deleted before their
children today to support pci is absoltuely broken.  It is a simple
matter of code bugs.  The device tree semantics are tree semantics not
random order semantics.

I will aim to take a second look when I can spend a little more time
and give you more concrete reasons (other than the old NAK from Viro)
about why recursive sysfs directory removal can cause real bugs.  It is
just subtle enough I can't remember the set of the problems in detail
and a quick look at the code is not enough to remind me.  But I have run
into real issues with even the limited recursive remvoval that sysfs
does today.

Eric
--
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