On Sun, Nov 21, 2010 at 01:47:22PM -0800, Tony Luck wrote:
Yeah, let's wait and see.
[..]
True, true.
Yep, textual alignment.
[..]
Right, and I was also wondering what might happen if userspace accesses
the bin attribute before you've removed it from the sysfs hierarchy but
after erasing its backing storage in the firmware?
AFAICT, it could be that those ps->data and ps->size members which are
accessed in pstore_show() (which is called when the bin attribute is
read from /sysfs) after the block of data is erased by platform driver,
might contain crap data and memory_read_from_buffer() could do some
illegal accesses to some kernel memory if not cleared properly by the
->erase() routine.
OTOH, you might want to do the clearing here and leave the platform
driver as dumb as possible by having a lower level __pstore_erase()
wrapper or similar.
Do you see my point? (I could very well be completely offcourse too :))
Thanks.
--
Regards/Gruss,
Boris.
--