]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 1 Dec 2017 20:10:48 +0000 (18:10 -0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 4 Dec 2017 10:46:29 +0000 (08:46 -0200)
commit188b13a8b454feca68d8f6f428abbeae36ac6e06
treec42cea90a46bd97ec14b939f0d7d6a82160246bd
parent8f163ae498b255da02cac6309df3e1cee1e3fa40
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()

Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().

We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE.

The patch also changes touch_pud() in the same way.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a8f97366452ed491d13cf1e44241bc0b5740b1f0)
CVE-2017-1000405
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
mm/huge_memory.c