/* * Copy the user page. No aliasing to deal with so we can just * attack the kernel's existing mapping of these pages.
*/ staticvoid v6_copy_user_highpage_nonaliasing(struct page *to, struct page *from, unsignedlong vaddr, struct vm_area_struct *vma)
{ void *kto, *kfrom;
/* * Clear the user page. No aliasing to deal with so we can just * attack the kernel's existing mapping of this page.
*/ staticvoid v6_clear_user_highpage_nonaliasing(struct page *page, unsignedlong vaddr)
{ void *kaddr = kmap_atomic(page);
clear_page(kaddr);
kunmap_atomic(kaddr);
}
/* * Discard data in the kernel mapping for the new page. * FIXME: needs this MCRR to be supported.
*/ staticvoid discard_old_kernel_data(void *kto)
{
__asm__("mcrr p15, 0, %1, %0, c6 @ 0xec401f06"
:
: "r" (kto), "r" ((unsignedlong)kto + PAGE_SIZE - 1)
: "cc");
}
/* * Clear the user page. We need to deal with the aliasing issues, * so remap the kernel page into the same cache colour as the user * page.
*/ staticvoid v6_clear_user_highpage_aliasing(struct page *page, unsignedlong vaddr)
{ unsignedlong to = COPYPAGE_V6_TO + (CACHE_COLOUR(vaddr) << PAGE_SHIFT);
/* FIXME: not highmem safe */
discard_old_kernel_data(page_address(page));
/* * Now clear the page using the same cache colour as * the pages ultimate destination.
*/
raw_spin_lock(&v6_lock);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.