lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 09 May 2008 16:04:53 +0100 From: Jeremy Fitzhardinge <jeremy@...p.org> To: Ross Biro <rossb@...gle.com> CC: linux-kernel@...r.kernel.org, linux-mm@...ck.org Subject: Re: [RFC/PATCH 2/2] MM: Make Page Tables Relocatable --relcoation code Ross Biro wrote: > +void update_new_page_and_free(struct mm_struct *mm, struct page *old_page) > +{ > + > + int type; > + > + /* Currently we only worry about cpu bits in ptes. */ > + if (old_page->page_table_type == PAGE_TABLE_PTE) { > + struct page *new_page = old_page->migrated_page; > + spinlock_t *ptl; > + pte_t *old; > + pte_t *new; > + int i; > +#ifdef __pte_lockptr > + ptl = __pte_lockptr(new_page); > +#else > + ptl = &mm->page_table_lock; > +#endif > + spin_lock(ptl); > + old = (pte_t *)kmap_atomic(old_page, KM_PTE0); > + new = (pte_t *)kmap_atomic(new_page, KM_PTE1); > + for (i = 0; i < PTRS_PER_PTE; i++) > + arch_copy_cpu_bits_pte(old, new); > old++, new++? > + > + kunmap_atomic(new_page, KM_PTE1); > + kunmap_atomic(old_page, KM_PTE0); > + new_page->migrated_page = NULL; > + spin_unlock(ptl); > + } > + > + old_page->migrated_page = NULL; > + type = old_page->page_table_type; > + reset_page_mapcount(old_page); > + > + free_page_table_page(mm, old_page, type); > +} J -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists