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]
Date:	Mon, 25 May 2009 00:53:21 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>,
	Cornelia Huck <cornelia.huck@...ibm.com>,
	linux-fsdevel@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...stanetworks.com>,
	stern <stern@...land.harvard.edu>
Subject: Re: [PATCH 25/20] sysfs: Only support removing emtpy sysfs  directories.

ebiederm@...ssion.com (Eric W. Biederman) writes:

> Kay Sievers <kay.sievers@...y.org> writes:
>
>>> Let's make the plan to investigate these, and see how hard it would be
>>> to actually remove these with the current device/sysfs infrastructure.
>>> 
>>> Fixing the users and adding back auto-deletion are the only two real options.
>>
>> Seems, we should remove non-directory files, which in most cases belong
>> to the kobject itself, but the user's cleanup logic does not cover the
>> removal of the created files.
>>
>> But I think, we should still warn, if we find a sub-directory inside a
>> directory we are going to remove.
>
> So far complaining about deleting non-empty directories is finding
> real bugs.  It does not appear that too many users that delete
> non-empty directories.
>
> My plan moving forward is to see what has goofed and how hard it is to
> change the callers to clean up after themselves.  If it is not a pain
> to fix the callers who forget to delete their attributes that looks
> like the right way forward.
>
> It is certainly the principle of least surprise.

Currently I expect that those attributes that are not deleted may
actually be bugs as well.  If a driver manually adds sysfs files after
device_create/device_register the uevent will have already been sent
and you can not safely use those attributes in when processing a hotplug
event.

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