Module Name:    src
Committed By:   maxv
Date:           Sat Dec 29 17:54:54 UTC 2018

Modified Files:
        src/lib/libnvmm: libnvmm_x86.c

Log Message:
Fix the segmentation check, the limit is relative, not absolute.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libnvmm/libnvmm_x86.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libnvmm/libnvmm_x86.c
diff -u src/lib/libnvmm/libnvmm_x86.c:1.6 src/lib/libnvmm/libnvmm_x86.c:1.7
--- src/lib/libnvmm/libnvmm_x86.c:1.6	Thu Dec 27 07:22:31 2018
+++ src/lib/libnvmm/libnvmm_x86.c	Sat Dec 29 17:54:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: libnvmm_x86.c,v 1.6 2018/12/27 07:22:31 maxv Exp $	*/
+/*	$NetBSD: libnvmm_x86.c,v 1.7 2018/12/29 17:54:54 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -472,7 +472,7 @@ segment_apply(struct nvmm_x64_state_seg 
 		limit *= PAGE_SIZE;
 	}
 
-	if (__predict_false(*gva + seg->base + size > limit)) {
+	if (__predict_false(*gva + size > limit)) {
 		goto error;
 	}
 

Reply via email to