Deleted Added
full compact
kern_procctl.c (194766) kern_procctl.c (195104)
1/*-
2 * Copyright (c) 1994, Sean Eric Fagan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1994, Sean Eric Fagan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/kern/sys_process.c 194766 2009-06-23 20:45:22Z kib $");
33__FBSDID("$FreeBSD: head/sys/kern/sys_process.c 195104 2009-06-27 13:58:44Z rwatson $");
34
35#include "opt_compat.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/lock.h>
40#include <sys/mutex.h>
41#include <sys/syscallsubr.h>

--- 353 unchanged lines hidden (view full) ---

395 void *addr;
396 int error = 0;
397#ifdef COMPAT_IA32
398 int wrap32 = 0;
399
400 if (SV_CURPROC_FLAG(SV_ILP32))
401 wrap32 = 1;
402#endif
34
35#include "opt_compat.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/lock.h>
40#include <sys/mutex.h>
41#include <sys/syscallsubr.h>

--- 353 unchanged lines hidden (view full) ---

395 void *addr;
396 int error = 0;
397#ifdef COMPAT_IA32
398 int wrap32 = 0;
399
400 if (SV_CURPROC_FLAG(SV_ILP32))
401 wrap32 = 1;
402#endif
403 AUDIT_ARG(pid, uap->pid);
404 AUDIT_ARG(cmd, uap->req);
405 AUDIT_ARG(addr, uap->addr);
406 AUDIT_ARG(value, uap->data);
403 AUDIT_ARG_PID(uap->pid);
404 AUDIT_ARG_CMD(uap->req);
405 AUDIT_ARG_ADDR(uap->addr);
406 AUDIT_ARG_VALUE(uap->data);
407 addr = &r;
408 switch (uap->req) {
409 case PT_GETREGS:
410 case PT_GETFPREGS:
411 case PT_GETDBREGS:
412 case PT_LWPINFO:
413 break;
414 case PT_SETREGS:

--- 129 unchanged lines hidden (view full) ---

544 if (proctree_locked)
545 sx_xunlock(&proctree_lock);
546 return (ESRCH);
547 }
548 tid = pid;
549 pid = p->p_pid;
550 }
551 }
407 addr = &r;
408 switch (uap->req) {
409 case PT_GETREGS:
410 case PT_GETFPREGS:
411 case PT_GETDBREGS:
412 case PT_LWPINFO:
413 break;
414 case PT_SETREGS:

--- 129 unchanged lines hidden (view full) ---

544 if (proctree_locked)
545 sx_xunlock(&proctree_lock);
546 return (ESRCH);
547 }
548 tid = pid;
549 pid = p->p_pid;
550 }
551 }
552 AUDIT_ARG(process, p);
552 AUDIT_ARG_PROCESS(p);
553
554 if ((p->p_flag & P_WEXIT) != 0) {
555 error = ESRCH;
556 goto fail;
557 }
558 if ((error = p_cansee(td, p)) != 0)
559 goto fail;
560

--- 452 unchanged lines hidden ---
553
554 if ((p->p_flag & P_WEXIT) != 0) {
555 error = ESRCH;
556 goto fail;
557 }
558 if ((error = p_cansee(td, p)) != 0)
559 goto fail;
560

--- 452 unchanged lines hidden ---