On 7/10/07, Robert P. J. Day <[EMAIL PROTECTED]> wrote:
i'm curious about this snippet from the above source file:
...
/* This is needed, because copy_page and memcpy are not usable for copying
* task structs.
*/
static inline void do_copy_page(long *dst, long *src)
{
int n;
for (n = PAGE_SIZE / sizeof(long); n; n--)
*dst++ = *src++;
}
...
and why not? what is it about copy_page or memcpy that makes it
unsuitable for copying task structs? thanks.
Check out this LKML message
http://www.ussg.iu.edu/hypermail/linux/kernel/0607.0/1886.html
"swsusp should not use memcpy for snapshotting memory, because on some
architectures memcpy may increase preempt_count. Then, as a result, wrong
value of preempt_count is stored in the image.
Replace memcpy in copy_data_pages with an open-coded loop."
rday
Bhanu
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ
--
The box said "Requires Windows Vista or better." So I installed LINUX
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ