Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531876

Re: [PATCH] mremap: move_ptes: check pte dirty after its removal

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mremap: move_ptes: check pte dirty after its removal
Date 2016-11-29 04:10 +0100
Message-ID <sIGXT-2Bs-7@gated-at.bofh.it> (permalink)
References (2 earlier) <sIpDH-8b7-7@gated-at.bofh.it> <sIpDH-8b7-9@gated-at.bofh.it> <sIpNn-8es-11@gated-at.bofh.it> <sIxKV-4YT-3@gated-at.bofh.it> <sIGOd-2j9-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 28, 2016 at 6:57 PM, Aaron Lu <aaron.lu@intel.com> wrote:
>
> Here is a fix patch, sorry for the trouble.

I don't think you tested this one.. You've now essentially reverted
5d1904204c99 entirely by making the new force_flush logic a no-op.

> +               pmd = pmdp_huge_get_and_clear(mm, old_addr, old_pmd);
>                 if (pmd_present(*old_pmd) && pmd_dirty(*old_pmd))
>                         force_flush = true;

You need to be testing "pmd", not "*old_pmd".

Because now "*old_pmd" will be zeroes.

>                 if (pte_present(*old_pte) && pte_dirty(*old_pte))
>                         force_flush = true;

Similarly here. You need to check "pte", not "*old_pte".

            Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] use mmu gather logic for tlb flush in mremap Aaron Lu <aaron.lu@intel.com> - 2016-11-28 09:40 +0100
  [PATCH 2/2] mremap: use mmu gather logic for tlb flush in mremap Aaron Lu <aaron.lu@intel.com> - 2016-11-28 09:50 +0100
    Re: [PATCH 2/2] mremap: use mmu gather logic for tlb flush in mremap Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-28 18:20 +0100
      [PATCH] mremap: move_ptes: check pte dirty after its removal Aaron Lu <aaron.lu@intel.com> - 2016-11-29 04:00 +0100
        Re: [PATCH] mremap: move_ptes: check pte dirty after its removal Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-29 04:10 +0100
          Re: [PATCH] mremap: move_ptes: check pte dirty after its removal Aaron Lu <aaron.lu@intel.com> - 2016-11-29 04:30 +0100
          [PATCH update] mremap: move_ptes: check pte dirty after its removal Aaron Lu <aaron.lu@intel.com> - 2016-11-29 06:30 +0100
    Re: [PATCH 2/2] mremap: use mmu gather logic for tlb flush in mremap Dave Hansen <dave.hansen@intel.com> - 2016-11-28 18:40 +0100
      Re: [PATCH 2/2] mremap: use mmu gather logic for tlb flush in mremap Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-28 18:50 +0100

csiph-web