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:	Tue, 9 Aug 2011 08:58:53 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc:	<linux-mm@...ck.org>, Andrew Morton <akpm@...ux-foundation.org>,
	<linux-kernel@...r.kernel.org>,
	Wu Fengguang <fengguang.wu@...el.com>,
	Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH 2/2] vmscan: activate executable pages after first usage

On Mon, 8 Aug 2011 15:07:00 +0400
Konstantin Khlebnikov <khlebnikov@...nvz.org> wrote:

> Logic added in commit v2.6.30-5507-g8cab475
> (vmscan: make mapped executable pages the first class citizen)
> was noticeably weakened in commit v2.6.33-5448-g6457474
> (vmscan: detect mapped file pages used only once)
> 
> Currently these pages can become "first class citizens" only after second usage.
> 
> After this patch page_check_references() will activate they after first usage,
> and executable code gets yet better chance to stay in memory.
> 
> TODO:
> run some cool tests like in v2.6.30-5507-g8cab475 =)
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>

How effective does this work on your test ?



> ---
>  mm/vmscan.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 3cd766d..29b3612 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -727,6 +727,12 @@ static enum page_references page_check_references(struct page *page,
>  		if (referenced_page || referenced_ptes > 1)
>  			return PAGEREF_ACTIVATE;
>  
> +		/*
> +		 * Activate file-backed executable pages after first usage.
> +		 */
> +		if (vm_flags & VM_EXEC)
> +			return PAGEREF_ACTIVATE;
> +
>  		return PAGEREF_KEEP;
>  	}
>  
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ