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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20121210192502.4063413a4026cb1009573b20@canb.auug.org.au>
Date:	Mon, 10 Dec 2012 19:25:02 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: linux-next: manual merge of the akpm tree with the tip tree

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
mm/huge_memory.c between commit 2083d67027ad ("mm/mempolicy: Implement
change_prot_numa() in terms of change_protection()") from the tip,  tree
and commit "thp: change_huge_pmd(): make sure we don't try to make a page
writable" from the akpm tree.

I fixed it up (I think - see below) and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc include/linux/migrate.h
index bcb5ddc,50d2974..0000000
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@@ -7,16 -7,13 +7,23 @@@
  
  typedef struct page *new_page_t(struct page *, unsigned long private, int **);
  
 +enum migrate_reason {
 +	MR_COMPACTION,
 +	MR_MEMORY_FAILURE,
 +	MR_MEMORY_HOTPLUG,
 +	MR_SYSCALL,		/* also applies to cpusets */
 +	MR_MEMPOLICY_MBIND,
 +	MR_NUMA_MISPLACED,
 +	MR_CMA
 +};
 +
+ /*
+  * Return values from addresss_space_operations.migratepage():
+  * - negative errno on page migration failure;
+  * - zero on page migration success;
+  */
+ #define MIGRATEPAGE_SUCCESS		0
+ 
  #ifdef CONFIG_MIGRATION
  
  extern void putback_lru_pages(struct list_head *l);
diff --cc mm/migrate.c
index c0afe60,c3724b6..0000000
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@@ -981,8 -977,7 +981,8 @@@ int migrate_pages(struct list_head *fro
  			case -EAGAIN:
  				retry++;
  				break;
- 			case 0:
+ 			case MIGRATEPAGE_SUCCESS:
 +				nr_succeeded++;
  				break;
  			default:
  				/* Permanent failure */
@@@ -991,14 -986,8 +991,14 @@@
  			}
  		}
  	}
- 	rc = 0;
+ 	rc = nr_failed + retry;
  out:
 +	if (nr_succeeded)
 +		count_vm_events(PGMIGRATE_SUCCESS, nr_succeeded);
 +	if (nr_failed)
 +		count_vm_events(PGMIGRATE_FAIL, nr_failed);
 +	trace_mm_migrate_pages(nr_succeeded, nr_failed, mode, reason);
 +
  	if (!swapwrite)
  		current->flags &= ~PF_SWAPWRITE;
  
diff --cc mm/huge_memory.c
index 2c4e4d4,28a368c..0000000
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@@ -1352,17 -1433,8 +1352,18 @@@ int change_huge_pmd(struct vm_area_stru
  	if (__pmd_trans_huge_lock(pmd, vma) == 1) {
  		pmd_t entry;
  		entry = pmdp_get_and_clear(mm, addr, pmd);
 -		entry = pmd_modify(entry, newprot);
 +		if (!prot_numa)
 +			entry = pmd_modify(entry, newprot);
 +		else {
 +			struct page *page = pmd_page(*pmd);
 +
 +			/* only check non-shared pages */
 +			if (page_mapcount(page) == 1 &&
 +			    !pmd_numa(*pmd)) {
 +				entry = pmd_mknuma(entry);
 +			}
 +		}
+ 		BUG_ON(pmd_write(entry));
  		set_pmd_at(mm, addr, pmd, entry);
  		spin_unlock(&vma->vm_mm->page_table_lock);
  		ret = 1;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ