+ read-write-migration-entries-make-mprotect-convert-write-migration-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     read-write-migration-entries-make-mprotect-convert-write-migration fix

has been added to the -mm tree.  Its filename is

     read-write-migration-entries-make-mprotect-convert-write-migration-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Christoph Lameter <clameter@xxxxxxx>

On Thu, 27 Apr 2006, Andrew Morton wrote:

> For some reason David has just nuked PAGE_READONLY in sparc64, so this won't
> compile.

The check for PAGE_READONLY is not really essential. We just want to be
safe for the unlikely case that if mprotect is called during page
migration. If we simply reset all migration entries to read then
nothing bad can happen. We just may have to take another fault to correct
the permissions later.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 mm/mprotect.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -puN mm/mprotect.c~read-write-migration-entries-make-mprotect-convert-write-migration-fix mm/mprotect.c
--- 25/mm/mprotect.c~read-write-migration-entries-make-mprotect-convert-write-migration-fix	Thu Apr 27 16:18:39 2006
+++ 25-akpm/mm/mprotect.c	Thu Apr 27 16:18:39 2006
@@ -48,11 +48,14 @@ static void change_pte_range(struct mm_s
 			set_pte_at(mm, addr, pte, ptent);
 			lazy_mmu_prot_update(ptent);
 		} else
-		if (!pte_file(oldpte) && pgprot_val(newprot) ==
-						 pgprot_val(PAGE_READONLY)) {
+		if (!pte_file(oldpte)) {
 			swp_entry_t entry = pte_to_swp_entry(oldpte);
 
 			if (is_write_migration_entry(entry)) {
+				/*
+				 * A protection check would be difficult
+				 * Just be safe and disable write.
+				 */
 				make_migration_entry_read(&entry);
 				set_pte_at(mm, addr, pte,
 					swp_entry_to_pte(entry));
_

Patches currently in -mm which might be from clameter@xxxxxxx are

page-migration-make-do_swap_page-redo-the-fault.patch
slab-extract-cache_free_alien-from-__cache_free.patch
migration-remove-unnecessary-pageswapcache-checks.patch
migration-remove-unnecessary-pageswapcache-checks-fix.patch
swapless-v2-try_to_unmap-rename-ignrefs-to-migration.patch
swapless-v2-add-migration-swap-entries.patch
swapless-v2-make-try_to_unmap-create-migration-entries.patch
swapless-v2-rip-out-swap-portion-of-old-migration-code.patch
swapless-v2-revise-main-migration-logic.patch
wait-for-migrating-page-after-incr-of-page-count-under-anon_vma-lock.patch
preserve-write-permissions-in-migration-entries.patch
migration_entry_wait-use-the-pte-lock-instead-of-the-anon_vma-lock.patch
read-write-migration-entries-implement-correct-behavior-in-copy_one_pte.patch
read-write-migration-entries-make-mprotect-convert-write-migration.patch
read-write-migration-entries-make-mprotect-convert-write-migration-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux