Subject: + mm-dont-lose-the-soft_dirty-flag-on-mprotect.patch added to -mm tree To: avagin@xxxxxxxxxx,bp@xxxxxxx,gorcunov@xxxxxxxxxx,hpa@xxxxxxxxx,mingo@xxxxxxxxxx,tglx@xxxxxxxxxxxxx,wency@xxxxxxxxxxxxxx,xemul@xxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 29 Jan 2014 12:19:39 -0800 The patch titled Subject: mm: don't lose the SOFT_DIRTY flag on mprotect has been added to the -mm tree. Its filename is mm-dont-lose-the-soft_dirty-flag-on-mprotect.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-dont-lose-the-soft_dirty-flag-on-mprotect.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-dont-lose-the-soft_dirty-flag-on-mprotect.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrey Vagin <avagin@xxxxxxxxxx> Subject: mm: don't lose the SOFT_DIRTY flag on mprotect The SOFT_DIRTY bit shows that the content of memory was changed after a defined point in the past. mprotect() doesn't change the content of memory, so it must not change the SOFT_DIRTY bit. This patch does nothing with _PAGE_SWP_SOFT_DIRTY, becase pte_modify() is called only for present pages. Fixes 0f8975ec4db2 ("mm: soft-dirty bits for user memory changes tracking"). Signed-off-by: Andrey Vagin <avagin@xxxxxxxxxx> Acked-by: Cyrill Gorcunov <gorcunov@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Pavel Emelyanov <xemul@xxxxxxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxx> Cc: Wen Congyang <wency@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/include/asm/pgtable_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN arch/x86/include/asm/pgtable_types.h~mm-dont-lose-the-soft_dirty-flag-on-mprotect arch/x86/include/asm/pgtable_types.h --- a/arch/x86/include/asm/pgtable_types.h~mm-dont-lose-the-soft_dirty-flag-on-mprotect +++ a/arch/x86/include/asm/pgtable_types.h @@ -121,7 +121,8 @@ /* Set of bits not changed in pte_modify */ #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ - _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY) + _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY | \ + _PAGE_SOFT_DIRTY) #define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE) #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) _ Patches currently in -mm which might be from avagin@xxxxxxxxxx are mm-dont-lose-the-soft_dirty-flag-on-mprotect.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