Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jun 2019 02:47:06 -0500
From:      Doug Moore <dougm@rice.edu>
To:        Doug Moore <dougm@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r349363 - head/sys/vm
Message-ID:  <7a398e1a-4bd3-f18c-2b64-1f8987a63cd1@rice.edu>
In-Reply-To: <201906250744.x5P7ibLv009949@repo.freebsd.org>
References:  <201906250744.x5P7ibLv009949@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I regret that I omitted the following from the commit message below:

Tested by: pho

Doug Moore

On 6/25/19 2:44 AM, Doug Moore wrote:
> Author: dougm
> Date: Tue Jun 25 07:44:37 2019
> New Revision: 349363
> URL: https://svnweb.freebsd.org/changeset/base/349363
>
> Log:
>   vm_map_protect may return an INVALID_ARGUMENT or PROTECTION_FAILURE
>   error response after clipping the first map entry in the region to be
>   reserved. This creates a pair of matching entries that should have
>   been "simplified" back into one, or never created. This change defers
>   the clipping of that entry until those two vm_map_protect failure
>   cases have been ruled out.
>   
>   Reviewed by: alc
>   Approved by: markj (mentor)
>   Differential Revision: https://reviews.freebsd.org/D20711
>
> Modified:
>   head/sys/vm/vm_map.c
>
> Modified: head/sys/vm/vm_map.c
> ==============================================================================
> --- head/sys/vm/vm_map.c	Tue Jun 25 07:04:47 2019	(r349362)
> +++ head/sys/vm/vm_map.c	Tue Jun 25 07:44:37 2019	(r349363)
> @@ -2472,11 +2472,8 @@ again:
>  
>  	VM_MAP_RANGE_CHECK(map, start, end);
>  
> -	if (vm_map_lookup_entry(map, start, &entry)) {
> -		vm_map_clip_start(map, entry, start);
> -	} else {
> +	if (!vm_map_lookup_entry(map, start, &entry))
>  		entry = entry->next;
> -	}
>  
>  	/*
>  	 * Make a first pass to check for protection violations.
> @@ -2515,6 +2512,7 @@ again:
>  	 * now will do cow due to allowed write (e.g. debugger sets
>  	 * breakpoint on text segment)
>  	 */
> +	vm_map_clip_start(map, entry, start);
>  	for (current = entry; current->start < end; current = current->next) {
>  
>  		vm_map_clip_end(map, current, end);
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7a398e1a-4bd3-f18c-2b64-1f8987a63cd1>