Home
last modified time | relevance | path

Searched refs:we (Results 1 – 25 of 40) sorted by relevance

12

/xnu-11215.1.10/doc/vm/
H A Dfreezer.md13 …nerally speaking, we want the freezer to run when the device is under some memory pressure but bef…
19we call `task_freeze` (`osfmk/kern/task.c`) which calls `vm_map_freeze` (`osfmk/vm/vm_map.c`). `vm…
21we have finished creating this contiguous compressor VA range, we put those segments on the swapou…
28 …y that's simply mapped into the same process in multiple places though, so we do a quick forward s…
38we can get rid of these limits. However, when we tried to remove them we discovered they were mask…
43 …tly, we freeze processes in the idle band in LRU order (apps that have been idle the longest get f…
48 …reeze the leader process first (we skip coalition members that are not the leader). Once we freeze…
62 When a frozen process is resumed we call it a thaw. Functionally, this is identical to a regular ap…
68we may re-freeze it. The exact heuristics for re-freeze are determined by the freezer thread. See …
80we have a limited number of slots in the freezer (and a swap file limit), so we don't have to keep…
[all …]
H A Dmemorystatus_kills.md35 When the system hits the vnode limit, and the VFS subsystem is not able to recycle any vnodes, we k…
41 …ical = memorystatus_available_pages_critical_base`. In practice this means we kill idle procs when…
45 …e jetsam. If we determine that the idle band contains exclusively false idle daemons, and there ar…
47 …se the daemons re-launch very quickly we can get stuck in jetsam loops where the daemons are re-la…
61 …ecifically the phantom cache has detected pressure (based on the rate that we're paging out and re…
73 …e thread that performs this sysctl then kills every frozen process so that we can fully reclaim al…
74 Since frozen processes can be in any band <= foreground, we scan the bands for procs with the `P_ME…
88 The compressor has detected that we've exceeded a specific number of compressions and decompression…
100 …rrently M1 or later iPads) and we're unable to allocate more swap files (either because we've run …
101 …alitions) in ascending jetsam priority order. If we're approaching but not yet at the swapfile lim…
[all …]
H A Dmemorystatus.md8 The xnu memorystatus subsystem is responsible for recovering the system when we're running dangerou…
62 1. Log this state to the os log (or serial if we're early in boot)
64we sometimes do pre-emptive actions on a healthy system if we're somewhat low on a specific resour…
76 …otected by the `proc_list_mlock` (Yes this is bad for scalability. Ideally we'd use finer grain lo…
119 Since we purge purgeable memory and trim the secluded pool quickly under memory pressure, this can …
147 It's woken up via a call to `memorystatus_thread_wake` whenever any subsystem determines we're runn…
149 …_memorystatus_2`, and `VM_memorystatus_3`. But we currently only use `VM_memorystatus_1`. At one p…
173we do not want to wake up ReportCrash while the system is low on memory, we maintain one global sn…
175 …_get_jetsam_snapshot` in `bsd/kern/kern_memorystatus.c` for details. Since we only have one global…
179 …and uses it as an input for its freezer recommendation algorithm. However, we're not currently usi…
[all …]
H A Dsanitize.md152 API requires some additional steps as we want the opaque types to only appear
211 case for syscalls. Therefore we need to modify the mach trap manually to use
224 Now that the internal function definitions see the opaque types, we need to
326 Libsystem or that Libsystem intercepts. For MIG entry points we generate our
328 we sometimes call a `__function_name` entry point exported by Libsystem that
371 size are intertwined (we check for overflow of address+size), so they are
/xnu-11215.1.10/doc/allocators/
H A Dread-only.md26 By necessity, we store lots of data on the heap that informs the various
28 directly mutable allocations because this fits what we need the memory for:
37 This is where the Read-Only Allocator provides its defense: we observe that
38 the majority of security-sensitive data that we allocate on the heap tends to
46 written programmatically (i.e. through calling a function), we raise the cost
69 relationships, we can validate the ownership invariant that we expect to hold.
90 that we're making conscious, considered choices over which zones are made
/xnu-11215.1.10/doc/building/
H A Dbound_checks.md25 * when it is disabled, whether we should allow `__indexable` and
29 * when it is set to panic, whether we should optimize for code size at the
38 know where we came from. This manifests as a "function(), file.c:0" call stack
41 On the other hand, we can ask clang to give us one trap instruction per bounds
42 check. In that configuration, we get arguably bad codegen, but the backtrace is
46 To debug a panic in a build optimizing for code size, we can read disassembly
47 and make inferences based on register values. For instance, if we look at one
49 context of our panic we know that `x8` is 0x0 and `x9` is 0x1000, then we know
50 we can't possibly have failed because of that bounds check. There are scripts
171 Once we have confidence that a file doesn't cause issues when -fbounds-safety is
[all …]
/xnu-11215.1.10/doc/observability/
H A Dmt_stackshot.md22 IPI'd into the debugger trap, and we want to avoid overheating the CPU).
84 Each CPU needs its own kcdata descriptor, but we don't know exactly how big each
86 reasonably-sized chunks as we need them. We also want the output to have each
87 task in order (to keep the output identical to singlethreaded stackshot), so we
90 The chunks are sized such that only one is needed for the average task. If we
91 have any extra room at the end of the current chunk once we finish with a task,
92 we can add it to the freelist - but this is not ideal. So, stackshot uses
115 we memcpy the contents of each kcdata chunk into a single buffer, stripping off
137 before (with a single CPU/thread) - with the only difference being that we can
161 estimating it once, we could estimate it for every task to further eliminate
/xnu-11215.1.10/san/tools/
H A Dkstksz128 -- It is possible that we redord BELOW event as first. Ignore it if we haven't seen
232 …-- When reading from a file, we can't use CoreSymbolication to symbolicate the stack frames as the…
/xnu-11215.1.10/tests/
H A Dstackshot_accuracy.m53 /* ssh won't let the session die if we still have file handles open to its output. */
98 /* we should be able to verify delta stackshots */
207 * given that we've targetted the pid, we can be sure that this
208 * ts_pid will be the pid we expect
247 T_LOG("did we stop because of the limit?: %s", fault_stats.sfs_stopped_faulting ? "yes" : "no");
254 /* if we couldn't fault the pages back in, then at least verify that we tried */
295 * then send SIGUSR1 to the parent to let it know that we are done.
347 /* check if we can run the child successfully */
H A Dstackshot_block_owner_14362384.m239 /* perform various actions with a mutex in kernel memory. note that, since we aren't allowed
243 * exist in the kernel (to determine if we're running with CONFIG_XNUPOST defined). Else,
291 /* We don't really care what goes into these messages, we're just sending something to a port. */
346 /* perform various actions with a rwlock in kernel memory. note that, since we aren't allowed
350 * exist in the kernel (to determine if we're running with CONFIG_XNUPOST defined). Else,
512 * This allows us to create a situation in the kernel where we know a thread to be blocked
525 …_create(&waiting, NULL, kmutex_grab_and_wait_thread, NULL); // thread will block until we signal it
634 …; // ping! msg_blocking_thread will now try to test_send_port us stuff, and block until we receive.
646 msg_recv_helper(test_recv_port); // thread should block until we receive one of its messages
H A Dstackshot_tests.m93 #define TEST_STACKSHOT_QUEUE_LABEL "houston.we.had.a.problem"
654 /* First kill the child so we can reap it */
772 …/* sleep for a bit in the hope of ensuring that the other thread has called the sysctl before we s…
834 * This will mark the test as failed but let it continue so we
854 /* First unwedge the child so we can reap it */
1038 dispatch_semaphore_t child_ready_sem; /* signal parent we're ready */
1052 /* Tell the main thread we're all set up, then wait for permission to exit */
1055 usleep(1); /* make sure we don't tailcall semaphore_wait */
1472 T_ASSERT_FALSE(seen_page_table_snapshot, "check that we haven't yet seen a page table snapshot");
1512 T_ASSERT_TRUE(nonzero_tte, "check that we saw at least one non-empty TTE");
[all …]
H A Dtest_sysctl_kern_procargs_25397314.m58 /* Determine how much memory to allocate. If allocSize is 0 we will use the size
59 * we get from the sysctl for our buffer. */
85 /* Without KERN_PROCARGS2, we can't tell where argv ends and environ begins.
/xnu-11215.1.10/libkern/libkern/c++/
H A DOSPtr.h55 functions. This is great! However, please note that we may \
63 off on enabling shared pointers in IOKit APIs until we have \
/xnu-11215.1.10/config/
H A DKasan_disabled.exports2 # so we generate an empty export list for non-KASan.
/xnu-11215.1.10/san/coverage/
H A Dkcov-blacklist-arm646 # These use a local variable to work out which stack we're on, but can end up with
/xnu-11215.1.10/makedefs/
H A DMakeInc.def153 # NOTE: order matters here. -Wno-xxx goes before opt-in of ones we want
206 # diagnostic here until we've completed that:
601 # Currently we have to keep alive two separated UBSAN runtimes (minimal for DEVELOPMENT,
602 # full for KASAN). This implies that we cannot use CFLAGS_$(CURRENT_KERNEL_CONFIG), because
603 # CFLAGS_DEVELOPMENT is folded into CFLAGS_KASAN. For the time being we leave this check here,
604 # as we work (independently) to both break the CFLAGS direct dependency and commonize the
758 # we're dealing with uintptr_t values here, so explicitly use bash which
831 # for a 16KB page runtime, and we wish to use the first virtual block
834 # multiple of the block size in alignment/length, we will implictly map
835 # it with our block mapping, and we therefore must reflect that the
[all …]
H A DMakeInc.top15 # As such, we have no knowledge of how to build
328 # we try to throttle behavior into more managable S "stripes" of N/S
370 # $(1) is the Makefile target we are building for
382 # $(1) is the Makefile target we are building for
388 # $(1) is the Makefile target we are building for
/xnu-11215.1.10/san/memory/
H A Dkasan-blacklist-arm6412 # These use a local variable to work out which stack we're on, but can end up with
/xnu-11215.1.10/libkdd/
H A DREADME.md73 object for a consumer to understand arbitrary data, we package it using container markers.
89 Following is an example of how we can describe a kernel specific struct sample_disk_io_stats in buf…
H A DKCDBasicTypeDescription.m126 * Calculate the maximum number of data elements we can parse, Taking into
128 * actual length of the data buffer and the offset into the buffer where we
/xnu-11215.1.10/doc/lifecycle/
H A Dhibernation.md55 may block, so we have to do this before preemption is disabled).
80 halted, and we are running on the boot CPU's idle thread in the shutdown
154 - On ARM64, we do not support this mode because hibernation is intended to
187 - On ARM64, we have to do this from `hibernate_machine_entrypoint()` because
188 we borrow free pages (as indicated by the page bitmaps) to store the
222 `s_last_absolute_time` test to fail if we don't do this fixup.
/xnu-11215.1.10/libsyscall/mach/
H A Dvm_map.defs36 * LIBSYSCALL_INTERFACE indicates that we are building the
/xnu-11215.1.10/libkern/zlib/
H A DREADME116 If you use the zlib library in a product, we would appreciate *not*
122 If you redistribute modified sources, we would appreciate that you include
/xnu-11215.1.10/doc/debugging/
H A Ddebugging.md334 After inspecting addkext macro code and calling few functions with arguments directly we can see th…
410 Now we can move a frame above and inspect stopped target:
432 provides the offset to the seek method. Lets see where we are in the source code.
451 That means we are broken by a library update! Older versions of library do not load data for a sect…
/xnu-11215.1.10/osfmk/mach/
H A Ddoubleagent_mig.defs88 out is_empty : boolean_t /* true if we've removed the last xattr in file */

12