[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XATTR structure for BIOS filesystem #2
During my "research" for implementing a complete XATTR structure for
entries in the BIOS filesystem (see mail some days ago), I've now - after
having some discussion about security problems and so - strumbled about the
datime() function each device driver has got to provide and I wonder if this
one could be used to report the time/datestamps needed.
So far, it does not support all m/a-time/date fields, but I think this
could perhaps be easily fixed by the following idea:
Most device drivers just seem to test if the rwflag is non-zero to check
if a write call is wanted, although my documentation (german Profibuch) says
explicitly a write call has to set rwflag=1. If one could rely on this fact,
it would be easy to implement modes 2-3 to report the m/a-t/d fields (c-t/d
is unlikely to change :-), if not, you'd have to face the fact that the
device driver would interpret this as a write call.
This may not be too much disturbing, since this call would be used only for
internal kernel use and would only be done for biosfs entries. So if you use
a new-style driver everything's fine, and if your driver doesn't understand
this it either reports an error - in which case you still can use the current
time just like the biosfs does up to now - or it would set its values to the
ones given, which mightn't do any harm if the caller preset's them with the
current time fields. The device would than act exactly like if it was running
on an older kernel which doesn't know about all these.
This would only involve changes in the biosfs.c code and would _not_ offer
the driver the possibility to manipulate its own XATTR structure in order to
do strange things like gaining superuper priority.
Does this sound like a good idea? It _seems_ to run ok on my setup.
PS: If the above written looks weird, then that's probably because it _is_.
WhoDunnIt: Torsten Scherer (Schiller, Tesche, ...)
Where: Faculty of Technology, University of Bielefeld, Germany
EMail: firstname.lastname@example.org / email@example.com