Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/kern Pull up the following revision, requested by max...



details:   https://anonhg.NetBSD.org/src/rev/1738ff6ad6f8
branches:  netbsd-8
changeset: 434751:1738ff6ad6f8
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Mar 17 11:19:27 2018 +0000

description:
Pull up the following revision, requested by maxv as part of ticket #637:

        sys/kern/kern_exec.c    1.456

Fix off-by-one, we don't want the entry point to equal the maximum
address.

diffstat:

 sys/kern/kern_exec.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 994395071146 -r 1738ff6ad6f8 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Sat Mar 17 08:11:18 2018 +0000
+++ b/sys/kern/kern_exec.c      Sat Mar 17 11:19:27 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.442.4.2 2017/09/11 05:13:45 snj Exp $  */
+/*     $NetBSD: kern_exec.c,v 1.442.4.3 2018/03/17 11:19:27 martin Exp $       */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.442.4.2 2017/09/11 05:13:45 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.442.4.3 2018/03/17 11:19:27 martin Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -420,10 +420,10 @@
 
                if (!newerror) {
                        /* Seems ok: check that entry point is not too high */
-                       if (epp->ep_entry > epp->ep_vm_maxaddr) {
+                       if (epp->ep_entry >= epp->ep_vm_maxaddr) {
 #ifdef DIAGNOSTIC
                                printf("%s: rejecting %p due to "
-                                   "too high entry address (> %p)\n",
+                                   "too high entry address (>= %p)\n",
                                         __func__, (void *)epp->ep_entry,
                                         (void *)epp->ep_vm_maxaddr);
 #endif



Home | Main Index | Thread Index | Old Index