Re: [RFC] persistent store

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Borislav Petkov
Date: Monday, November 22, 2010 - 12:32 am

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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] persistent store, Luck, Tony, (Sat Nov 20, 4:48 pm)
Re: [RFC] persistent store, Borislav Petkov, (Sun Nov 21, 2:07 am)
Re: [RFC] persistent store, David Miller, (Sun Nov 21, 2:14 pm)
Re: [RFC] persistent store, Tony Luck, (Sun Nov 21, 2:47 pm)
Re: [RFC] persistent store, Huang Ying, (Sun Nov 21, 6:59 pm)
Re: [RFC] persistent store, Borislav Petkov, (Mon Nov 22, 12:32 am)
Re: [RFC] persistent store, Borislav Petkov, (Mon Nov 22, 12:48 am)
Re: [RFC] persistent store, Alan Cox, (Mon Nov 22, 3:43 am)
Re: [RFC] persistent store, Tony Luck, (Mon Nov 22, 9:55 am)
Re: [RFC] persistent store, Tony Luck, (Mon Nov 22, 11:17 am)
Re: [RFC] persistent store, Geert Uytterhoeven, (Mon Nov 22, 11:24 am)
Re: [RFC] persistent store, Tony Luck, (Mon Nov 22, 11:33 am)