Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Raise the fill_vmentries() E2BIG limit from 1MB to 10MB



details:   https://anonhg.NetBSD.org/src/rev/3a59e516cc23
branches:  trunk
changeset: 446758:3a59e516cc23
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Dec 17 06:53:01 2018 +0000

description:
Raise the fill_vmentries() E2BIG limit from 1MB to 10MB

The previous limit was not enough for libFuzzer as it requires up to 2.5MB
in test-suite.

Alternative approaches to retrieve larger address map during happened to be
worse during the evaluation due to difficulties in locking and atomicity.

Discussed with <christos>

diffstat:

 sys/uvm/uvm_map.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 99867309ce1a -r 3a59e516cc23 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Mon Dec 17 04:37:15 2018 +0000
+++ b/sys/uvm/uvm_map.c Mon Dec 17 06:53:01 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.356 2018/09/12 15:58:08 maxv Exp $       */
+/*     $NetBSD: uvm_map.c,v 1.357 2018/12/17 06:53:01 kamil Exp $      */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.356 2018/09/12 15:58:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.357 2018/12/17 06:53:01 kamil Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -4963,7 +4963,7 @@
                return EINVAL;
 
        if (oldp) {
-               if (*oldlenp > 1024 * 1024)
+               if (*oldlenp > 10UL * 1024UL * 1024UL)
                        return E2BIG;
                count = *oldlenp / elem_size;
                if (count == 0)



Home | Main Index | Thread Index | Old Index