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>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Feb 2019 14:47:27 +0800
From:   Xuefeng Wang <wxf.wang@...ilicon.com>
To:     <catalin.marinas@....com>, <will.deacon@....com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
CC:     <wxf.wang@...ilicon.com>, <guohanjun@...wei.com>
Subject: [PATCH] Use flush tlb last level when change protection

The protection attributes are only kept in last level tlb, so
protection changing only need invalidate last level tlb, exclude
the PWC entries.

Signed-off-by: Xuefeng Wang <wxf.wang@...ilicon.com>
---
 mm/mprotect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mprotect.c b/mm/mprotect.c
index 36cb358..0c4303d 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -287,7 +287,7 @@ static unsigned long change_protection_range(struct vm_area_struct *vma,
 
 	/* Only flush the TLB if we actually modified any entries: */
 	if (pages)
-		flush_tlb_range(vma, start, end);
+		__flush_tlb_range(vma, start, end, PAGE_SIZE, true);
 	dec_tlb_flush_pending(mm);
 
 	return pages;
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ