kern_exec.c (63cb9308a75b99fe057409705bc1b2ac0293f578) kern_exec.c (b5cadc643e853fa4cb23e5315e6f40bf9979a9c0)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 1993, David Greenman
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

146SYSCTL_INT(_kern, OID_AUTO, disallow_high_osrel, CTLFLAG_RW,
147 &disallow_high_osrel, 0,
148 "Disallow execution of binaries built for higher version of the world");
149
150static int map_at_zero = 0;
151SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RWTUN, &map_at_zero, 0,
152 "Permit processes to map an object at virtual address 0.");
153
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 1993, David Greenman
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

146SYSCTL_INT(_kern, OID_AUTO, disallow_high_osrel, CTLFLAG_RW,
147 &disallow_high_osrel, 0,
148 "Disallow execution of binaries built for higher version of the world");
149
150static int map_at_zero = 0;
151SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RWTUN, &map_at_zero, 0,
152 "Permit processes to map an object at virtual address 0.");
153
154static int core_dump_can_intr = 1;
155SYSCTL_INT(_kern, OID_AUTO, core_dump_can_intr, CTLFLAG_RWTUN,
156 &core_dump_can_intr, 0,
157 "Core dumping interruptible with SIGKILL");
158
154static int
155sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
156{
157 struct proc *p;
158 int error;
159
160 p = curproc;
161#ifdef SCTL_MASK32

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

1938 for (; len > 0; base += runlen, offset += runlen, len -= runlen) {
1939 /*
1940 * Attempt to page in all virtual pages in the range. If a
1941 * virtual page is not backed by the pager, it is represented as
1942 * a hole in the file. This can occur with zero-filled
1943 * anonymous memory or truncated files, for example.
1944 */
1945 for (runlen = 0; runlen < len; runlen += PAGE_SIZE) {
159static int
160sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
161{
162 struct proc *p;
163 int error;
164
165 p = curproc;
166#ifdef SCTL_MASK32

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

1943 for (; len > 0; base += runlen, offset += runlen, len -= runlen) {
1944 /*
1945 * Attempt to page in all virtual pages in the range. If a
1946 * virtual page is not backed by the pager, it is represented as
1947 * a hole in the file. This can occur with zero-filled
1948 * anonymous memory or truncated files, for example.
1949 */
1950 for (runlen = 0; runlen < len; runlen += PAGE_SIZE) {
1951 if (core_dump_can_intr && curproc_sigkilled())
1952 return (EINTR);
1946 error = vm_fault(map, (uintptr_t)base + runlen,
1947 VM_PROT_READ, VM_FAULT_NOFILL, NULL);
1948 if (runlen == 0)
1949 success = error == KERN_SUCCESS;
1950 else if ((error == KERN_SUCCESS) != success)
1951 break;
1952 }
1953

--- 75 unchanged lines hidden ---
1953 error = vm_fault(map, (uintptr_t)base + runlen,
1954 VM_PROT_READ, VM_FAULT_NOFILL, NULL);
1955 if (runlen == 0)
1956 success = error == KERN_SUCCESS;
1957 else if ((error == KERN_SUCCESS) != success)
1958 break;
1959 }
1960

--- 75 unchanged lines hidden ---