[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XATTR structure for BIOS filesystem #2



> Not too bad an idea. I'd suggest the following "calling convention":
>
> - call datime in mode 0, store return value
> - call datime in mode 2
> - call datime in mode 0; compare with previous result; if the results
>   differ, call datime in mode 1 with the old value
>
> This way, you make sure that even old drivers will not permanently
> change access times because they don't know about mode 2 and 3.

That's right, but:

1) You would then force "old" drivers to keep their creation time, which
might be a good idea, but may be useless 'cause MiNT now returns the
current time/date for it, at least if you call Fxattr() and not Fdatime(),
so I doubt any driver itself, or literally any program uses this info so
far, so you needn't expect any troubles if you don't do so, I think.

2) (more general) Setting up an auxiliary FILEPTR in getxattr and filling it
with some fake data already needs some time (and so far I've forgotten to
take care of device drivers being responsable for more than one device, so
this would involve yet more ops) plus 3 or 4 calls to fdatime... Well, it's
not that I particulary dislike it, but I'm a _bit_ fanatic on speed, so I'd
like to be at least sure there isn't a faster solution with the same
properties.

The completely other idea (as discussed some days ago) could change the data
itself by gaining access to its bios_file over (struct bios_file *)f->fc.index,
only that for now it doesn't know an XATTR field exists. To be very clear:
This mustn't be extra implemented, this is already there, so I may very well
consider my own security thoughts being totally wasted and unfullfillable :-(

But this one would be quite faster for both sides.

But either method would take advantage if the kernelptr would not only
provide time manipulating functions, but time values itself... :-)

Shall we vote which idea is better? ;-)

bye,
TeSche
-- 
PS: If the above written looks weird, than that's because it probably IS.
WhoDunnIt: Torsten Scherer (Schiller, TeSche...)
Technical Faculty, University of Bielefeld, Germany (52'5"N 8'35"E)
EMail: itschere@techfak.uni-bielefeld.de / tesche@dave.hrz.uni-bielefeld.de