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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Dec 2014 11:30:53 +0800
From:	"Wang, Yalin" <Yalin.Wang@...ymobile.com>
To:	'Konstantin Khlebnikov' <koct9i@...il.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"n-horiguchi@...jp.nec.com" <n-horiguchi@...jp.nec.com>
Subject: [RFC] discard task stack pages instead of pageout into swap
 partition

Hi,

I am think of discard stack pages if the old
Page is under the stack pointer(Assume stack grow down)
of the task, This page don't need pageout, we can free it directly,
When the task need it again, we just use a zero page to
Map, it is safe for stack .

But I don't know how to implement it,
And is there some issue if do like this ?

The following is pseudo code to explain my ideas.
Any comments are appreciated !
Thanks
---
diff --git a/mm/vmscan.c b/mm/vmscan.c
index dcb4707..52e8314 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -962,6 +962,12 @@ static unsigned long shrink_page_list(struct list_head *page_list,
 			; /* try to reclaim the page below */
 		}
 
+		if (page_vm_flags(page) & (VM_GROWSUP | VM_GROWSDOWN) &&
+				PageAnon(page) && !PageSwapCache(page)) {
+			if (page_task_is_sleep(page) && task_sp > page->index) {
+				zap_page_range(vma, page->index, PAGE_SIZE);
+			}
+		}
 		/*
 		 * Anonymous process memory has backing store?
 		 * Try to allocate it some swap space here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ