User: Password:
|
|
Subscribe / Log in / New account

A critical look at sysfs attribute values

A critical look at sysfs attribute values

Posted Mar 18, 2010 7:47 UTC (Thu) by ptman (subscriber, #57271)
In reply to: A critical look at sysfs attribute values by adamgundy
Parent article: A critical look at sysfs attribute values

POSIX filesystems are not transactional (ACID) like many databases, but it
could probably be done if the user is willing to jump through some hoops.

For example, a sysfs directory might contain the separate files for separate
values and a file called "snapshot" which, when written to, would create a
subdirectory (which probably would need a unique name, and reading the
unique name from the snapshot-file would probably require file locking...)
with the separate files frozen to a specific point in time.

I'm probably missing something here and the idea is too complicated to
actually be used in the real world, I'm just trying to say that it might be
solved, but the solution wouldn't be very nice.


(Log in to post comments)

A critical look at sysfs attribute values

Posted Mar 18, 2010 14:47 UTC (Thu) by adamgundy (subscriber, #5418) [Link]

I would think that's an easy denial of service, unless you only allow root to take snapshots (which isn't very helpful). for example, just write a shell script that loops asking for as many snapshots as it can in as many sysfs directories as it can find.. chew up all the kernel memory.

it would probably be better to automatically provide a 'snapshot' file in every directory which can be read to get a consistent view of all files in the directory in some 'well known' format, eg 'key: value' per line like HTTP/SMTP etc.


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds