Thu Aug 25 19:54:30 2011 UTC ()
Move debug -> verbose


(reinoud)
diff -r1.318 -r1.319 src/sys/kern/kern_exec.c

cvs diff -r1.318 -r1.319 src/sys/kern/kern_exec.c (expand / switch to unified diff)

--- src/sys/kern/kern_exec.c 2011/08/25 19:14:07 1.318
+++ src/sys/kern/kern_exec.c 2011/08/25 19:54:30 1.319
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: kern_exec.c,v 1.318 2011/08/25 19:14:07 reinoud Exp $ */ 1/* $NetBSD: kern_exec.c,v 1.319 2011/08/25 19:54:30 reinoud Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -49,27 +49,27 @@ @@ -49,27 +49,27 @@
49 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 49 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
50 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 50 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
51 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 51 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
52 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 52 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
53 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 53 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
54 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 54 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
55 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 55 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
56 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 56 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
57 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 57 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
58 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 58 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59 */ 59 */
60 60
61#include <sys/cdefs.h> 61#include <sys/cdefs.h>
62__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.318 2011/08/25 19:14:07 reinoud Exp $"); 62__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.319 2011/08/25 19:54:30 reinoud Exp $");
63 63
64#include "opt_ktrace.h" 64#include "opt_ktrace.h"
65#include "opt_modular.h" 65#include "opt_modular.h"
66#include "opt_syscall_debug.h" 66#include "opt_syscall_debug.h"
67#include "veriexec.h" 67#include "veriexec.h"
68#include "opt_pax.h" 68#include "opt_pax.h"
69#include "opt_sa.h" 69#include "opt_sa.h"
70 70
71#include <sys/param.h> 71#include <sys/param.h>
72#include <sys/systm.h> 72#include <sys/systm.h>
73#include <sys/filedesc.h> 73#include <sys/filedesc.h>
74#include <sys/kernel.h> 74#include <sys/kernel.h>
75#include <sys/proc.h> 75#include <sys/proc.h>
@@ -379,27 +379,27 @@ check_exec(struct lwp *l, struct exec_pa @@ -379,27 +379,27 @@ check_exec(struct lwp *l, struct exec_pa
379 } 379 }
380 /* Seems ok: check that entry point is not too low */ 380 /* Seems ok: check that entry point is not too low */
381 if (epp->ep_entry < VM_MIN_ADDRESS) { 381 if (epp->ep_entry < VM_MIN_ADDRESS) {
382 aprint_verbose("check_exec: rejecting due to " 382 aprint_verbose("check_exec: rejecting due to "
383 "too low entry address\n"); 383 "too low entry address\n");
384 error = ENOEXEC; 384 error = ENOEXEC;
385 break; 385 break;
386 } 386 }
387 387
388 /* check limits */ 388 /* check limits */
389 if ((epp->ep_tsize > MAXTSIZ) || 389 if ((epp->ep_tsize > MAXTSIZ) ||
390 (epp->ep_dsize > (u_quad_t)l->l_proc->p_rlimit 390 (epp->ep_dsize > (u_quad_t)l->l_proc->p_rlimit
391 [RLIMIT_DATA].rlim_cur)) { 391 [RLIMIT_DATA].rlim_cur)) {
392 aprint_debug("check_exec: rejecting due to " 392 aprint_verbose("check_exec: rejecting due to "
393 "limits\n"); 393 "limits\n");
394 error = ENOMEM; 394 error = ENOMEM;
395 break; 395 break;
396 } 396 }
397 return 0; 397 return 0;
398 } 398 }
399 399
400 if (epp->ep_emul_root != NULL) { 400 if (epp->ep_emul_root != NULL) {
401 vrele(epp->ep_emul_root); 401 vrele(epp->ep_emul_root);
402 epp->ep_emul_root = NULL; 402 epp->ep_emul_root = NULL;
403 } 403 }
404 if (epp->ep_interp != NULL) { 404 if (epp->ep_interp != NULL) {
405 vrele(epp->ep_interp); 405 vrele(epp->ep_interp);