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, 16 Mar 2012 17:47:19 -0700
From:	John Stultz <>
To:	John Stultz <>
	Andrew Morton <>,
	Android Kernel Team <>,
	Robert Love <>, Mel Gorman <>,
	Hugh Dickins <>,
	Dave Hansen <>,
	Rik van Riel <>,
	Dmitry Adamushko <>,
	Dave Chinner <>, Neil Brown <>,
	Andrea Righi <>,
	"Aneesh Kumar K.V" <>
Subject: [PATCH] fadvise volatile fixes from Dmitry

On 03/16/2012 03:51 PM, John Stultz wrote:
> This patch provides new fadvise flags that can be used to mark
> file pages as volatile, which will allow it to be discarded if the
> kernel wants to reclaim memory.
Right after sending this I realized I had forgotten to include
some fixes for issues Dmitry pointed out. So I've included them

Signed-off-by: John Stultz<>
  mm/volatile.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/volatile.c b/mm/volatile.c
index e412a8b..f40c02e 100644
--- a/mm/volatile.c
+++ b/mm/volatile.c
@@ -220,11 +220,12 @@ long mapping_range_nonvolatile(struct address_space *mapping,
  			new->mapping = mapping;
  			new->range_node.start = end + 1;
  			new->range_node.end = node->end;
-			volatile_range_resize(vrange, node->start, start-1);
+			new->purged = vrange->purged;
  			if (range_on_lru(new))
+			volatile_range_resize(vrange, node->start, start-1);

@@ -263,7 +264,7 @@ void mapping_clear_volatile_ranges(struct address_space *mapping)
  static int volatile_shrink(struct shrinker *ignored, struct shrink_control *sc)
  	struct volatile_range *range, *next;
-	unsigned long nr_to_scan = sc->nr_to_scan;
+	s64 nr_to_scan = sc->nr_to_scan;
  	const gfp_t gfp_mask = sc->gfp_mask;

  	if (nr_to_scan&&  !(gfp_mask&  __GFP_FS))

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists