| /xnu-12377.41.6/tests/ |
| H A D | test_sysctl_kern_procargs_25397314.m | 61 T_LOG("procargs data should be %lu bytes", preflightSize); 72 T_ASSERT_LE(bufferSize, allocSize, "returned buffer size should be less than allocated size"); 75 /* Allocated buffer is larger than what kernel wrote, so it should match preflightSize */ 76 T_ASSERT_EQ(bufferSize, preflightSize, "buffer size should be the same as preflight size"); 121 …T_ASSERT_EQ(type, KERN_PROCARGS, "Legacy executable path should only be present for KERN_PROCARGS"… 263 T_ASSERT_NOTNULL(procargs->executablePath, "executable path should be non-null"); 264 T_ASSERT_GT([procargs->executablePath length], 0, "executable path should not be empty"); 269 T_ASSERT_NOTNULL(procargs->executablePath, "executable path should be non-null"); 270 T_ASSERT_GT([procargs->executablePath length], 0, "executable path should not be empty"); 278 T_ASSERT_NOTNULL(procargs->executablePath, "executable path should be non-null"); [all …]
|
| H A D | stackshot_block_owner_14362384.m | 288 "Context should match unslid location of mutex in kernel memory"); 400 …T_EXPECT_EQ(context, unslid_krwlck_address, "Context should match unslid location of rwlock in ker… 528 …ret = pthread_create(&grabbing, NULL, kmutex_grabbing_thread, NULL); // thread should immediately … 541 T_EXPECT_EQ(len, 2, "There should only be two blocking threads"); 546 …T_EXPECT_EQ(curr->wait_type, kThreadWaitKernelMutex, "Wait type should match expected KernelMutex … 547 …T_EXPECT_EQ(curr->owner, thread_id, "Thread ID of blocking thread should match 'owner' field in st… 553 kmutex_action(KMUTEX_SYSCTL_SIGNAL); // waiting thread should now unblock. 576 …ret = pthread_create(&tid, NULL, sem_grabbing_thread, (void*)&sem); // thread should immediately b… 583 T_EXPECT_EQ(len, 1, "Only one blocking thread should exist"); 584 …T_EXPECT_EQ(waitinfo.wait_type, kThreadWaitSemaphore, "Wait type should match expected Semaphore v… [all …]
|
| H A D | disk_mount_conditioner.m | 36 "Initial fsctl.get should return zeros", 59 "fsctl.set should succeed and fsctl.get should verify", T_META_TAG_VM_PREFERRED) 123 "fsctl.set zero values should fall back to original mount settings", T_META_TAG_VM_PREFERRED) 140 …"fsctl.set out-of-bounds values should fall back to original mount settings", T_META_TAG_VM_PREFER… 161 …"fsctl.set should restore fields on mount_t that it temporarily overrides", T_META_TAG_VM_PREFERRE… 187 /* now turn off the disk conditioner which should restore fields on the mount_t */ 194 …/* and finally set out-of-bounds values again to retrieve the new mount_t fields which should not … 217 "fsctl.get should not require root", 239 "fsctl.set should require root", 272 T_ASSERT_EQ_INT(0, err, "fsctl.set should not change info without root"); [all …]
|
| H A D | stackshot_idle_25570396.m | 146 * shared semaphore. This should spin up plenty of threads! */ 187 while(spin_threads); // should now appear as non-idle in delta shot 194 * Where this is called, there should be NUMENQUEUES idle threads (thanks to warm_up_threadpool) 208 "Idle count of %d should match expected value of %d...", 211 "Non-idle count of %d should match expected value of %d...", 231 …delta_stackshot = take_stackshot(0, since_time); /* Threads should appear in delta stackshot as no… 269 spin_threads = 0; /* pthread-made thread should now exit */
|
| H A D | stackshot_tests.m | 316 …RNO; T_EXPECT_EQ(ret, 0, "dt_launch_tool(\"" KCDATA_PATH " -s /dev/null kcdata\") should succeed"); 322 T_EXPECT_EQ(exit_status, 0, "kcdata.py should successfully run against our output"); 403 …T_WITH_ERRNO; T_ASSERT_POSIX_SUCCESS(result, "reading \"kern.stackshot_stats\" sysctl should succe… 404 T_EXPECT_EQ(oldlen, sizeof (*out), "kernel should update full stats structure"); 456 T_EXPECT_LT(pre.ss_last_start, pre.ss_last_end, "pre: stackshot should take time"); 457 …T_EXPECT_LT(pre.ss_count, post.ss_count, "stackshot count should increase when a stackshot is take… 458 …T_EXPECT_LT(pre.ss_duration, post.ss_duration, "stackshot duration should increase when a stacksho… 459 …T_EXPECT_LT(pre.ss_last_end, post.ss_last_start, "previous end should be less than new start after… 460 T_EXPECT_LT(post.ss_last_start, post.ss_last_end, "post: stackshot should take time"); 641 …T_WITH_ERRNO; T_QUIET; T_ASSERT_NE(v, 0l, "getenv(%s) = \"%s\" should be a non-zero hex number", C… [all …]
|
| /xnu-12377.41.6/tests/iokit/ |
| H A D | io_catalog_send_data.m | 116 T_EXPECT_MACH_SUCCESS(kret, "IOCatalogueSendData should " 119 /* this trick to build an entry by io_catalog_send_data should fail */ 122 "should fail as kIOReturnNotPrivileged in none-dev kernel without kernelmanagerd"); 126 "IOCatalogueSendData should return success with kernelmanagerd"); 129 "mismatched entry built by IOCatalogueSendData should not be opened");
|
| /xnu-12377.41.6/doc/allocators/ |
| H A D | api-basics.md | 23 clients should find sufficient, 56 for the buffer cache, and most client should either use `Z_NOWAIT` or `Z_WAITOK`. 121 are also provided but should typically rarely be used. 128 - types should be small enough to fit in the zone allocator: 134 - for union types, data/pointer overlaps should be avoided if possible. 135 when this isn't possible, a zone should be considered. 147 - variable sized allocations should have a single owner and not be refcounted; 195 <td>This should be used when the allocated type contains no kernel pointer only</td> 282 This section covers how typed allocators should be adopted to use 287 should probably use OSObject as a base class. C++ operators [all …]
|
| H A D | read-only.md | 53 To make best use of the Read-Only Allocator, some simple advice should be 56 1. Pointers to read-only elements should either reside in read-only memory 59 read-only element should include a pointer back to the read/write side (a
|
| /xnu-12377.41.6/iokit/DriverKit/ |
| H A D | IOWorkGroup.iig | 49 …* The application will have to first create an workgroup object. The application then should copy … 60 …* Once the workgroup port has been sent to the driver, the driver should be notified with a user-d… 87 * @brief Set the port for this workgroup. This should not be called directly. 98 …* @discussion Join() and Leave() require the caller to pass a token. This token should be allocat… 127 …* IOWorkGroup. This method should be called after the client has configured the event…
|
| H A D | OSAction.iig | 68 …* a TYPE attribute, so there should not be any need to directly call OSAction::Create… 131 * @discussion This call should be made before any possible invocation of the action. 142 * There should be no outstanding invocations of the action when EndWait is called, 143 * if necessary the action should be canceled before calling EndWait(). 159 * @param deadline Pass the time the wait should timeout, or zero for no timeout.
|
| H A D | IOEventLink.iig | 76 …* Once the remote eventlink port has been sent to the driver, the driver should be notified with a… 77 …* or other existing signaling mechanism. The driver should handle this by activating the IOEventLi… 179 * @discussion The eventlink should be activated before this call. This is not real-time safe. 196 …* IOEventLink. This method should be called after the client has configured the event…
|
| H A D | IOService.iig | 120 …* @param provider The IOService provider for the match. This should be OSRequiredCast to the… 131 …* Stop should quiesce all activity and when complete, pass the call to super. After c… 189 * @param queue Returned, retained queue or NULL. The caller should release this queue. 209 …operties Returned, retained dictionary of properties or NULL. The caller should release this dicti… 223 …* @param property Returned, retained property object or NULL. The caller should release this… 254 …* @discussion DriverKit notifies of changes in power of a provider. The driver should make itself… 290 … IOServiceOpen() call. The type parameter of that call is passed here. The driver should respond to 304 * The plist should contain the following IOKit matching keys: 337 …roperties Returned, retained array of dictionaries of properties or NULL. The caller should release
|
| H A D | IODMACommand.iig | 82 * The IODMACommand instance represents the mapping and should be kept prepared for the 109 * It should be retained until the map is no longer required. 158 * @param memory Returned IOMemoryDescriptor of the preparation. This should be
|
| H A D | IOUserClient.iig | 93 * This field should be set by the driver to an OSData object it created with 100 …* It is only retained during the invocation of ExternalMethod and should be retained … 235 …* CopyClientMemoryForType() with a given type, should return the same IOMemoryDescrip…
|
| /xnu-12377.41.6/doc/primitives/ |
| H A D | string-handling.md | 53 these functions have been deprecated or outright removed from xnu. You should 61 a length for the output buffer. **All** new string buffers should include space 133 While you are modifying a string, you should reference its data as some flavor 134 of indexable pointer, and only once you're done should you convert it to a 174 With -fbounds-safety enabled, you should structure the final operation modifying 241 should prefer APIs in the following order: 248 `strbufcmp`, and you should prefer `strbufcmp`. 250 `strn` functions are **never** recommended. You should use `strbuflen` over 252 makes the guidance to avoid `strn` functions easier), and you should use
|
| H A D | atomics.md | 124 `__sync_*`, `__c11_*` and `__atomic_*` compiler builtins should not be used. 137 The *consume* memory ordering should not be used 142 and these functions should not be used in new code. 300 before the loop should be used in this way: 401 that should pair with a store or rmw with release semantics or stronger
|
| /xnu-12377.41.6/bsd/vfs/ |
| H A D | vfs_stashtask.txt | 1 Changes to VFS should go through the file system presubmission testing sidebuild.
|
| /xnu-12377.41.6/doc/vm/ |
| H A D | sanitize.md | 41 Functions callable from userspace should be fully sanitized. Functions 88 the sanitizer tell the VM API that it should halt and return `KERN_SUCCESS` 90 sanitization succeeded and the VM API should proceed normally? 113 - 32 bit variants like `VM_GENERATE_UNSAFE_ADDR32` should be used for 32bit 118 - EXT variants like `VM_GENERATE_UNSAFE_EXT` should not be used directly. They 231 return their unwrapped safe values. In this function you should call the 330 to VM API that perform sanitizations. These entrypoints should be disabled 368 should be tested. The trials should be exhaustive for small values, and 399 other tests. You should not need to modify either of them. Note that string
|
| H A D | freezer.md | 17 …. Note that applications may contain multiple processes. These processes should all be in the same… 35 For 1, all processes in the coalition should generally get suspended and frozen together. See [coal… 36 For 2, daemons should not touch memory that is shared with a suspended app while that app is suspen… 38 …se, apps should not hold onto wired memory when they're suspended. So when we find that a suspende… 96 …ock. But in practice these mechanisms have not been unified. This policy should be re-visited befo…
|
| /xnu-12377.41.6/doc/mach_ipc/ |
| H A D | port_types.md | 31 new code generally should not use these. 59 - Should be created by `launchd` only and should be the system-wide bootstrap 62 - The receive right of this port should be immovable and should always belong to
|
| /xnu-12377.41.6/bsd/man/man2/ |
| H A D | getdirentriesattr.2 | 84 For maximum compatibility, client programs should use high-level APIs 146 You should initialise this variable to be the number of directory entries for which 164 you should use 253 you should be careful to support the behaviour specified by this document. 264 should be used to get the attributes for the mount point.
|
| /xnu-12377.41.6/doc/building/ |
| H A D | bound_checks.md | 25 * when it is disabled, whether we should allow `__indexable` and 27 * when it is enabled, whether a trap should be a panic, or whether it should 29 * when it is set to panic, whether we should optimize for code size at the 118 debugged bounds checks. You should also use bound-checks-debug for xnu changes
|
| /xnu-12377.41.6/config/ |
| H A D | README.DEBUG-kernel.txt | 36 <arch> should reflect the currently booted kernel architecture, either
|
| /xnu-12377.41.6/ |
| H A D | README.md | 11 …m other projects to avoid dependency cycles when building. These headers should be regularly synce… 220 The directory containing the header file should have a Makefile that 221 creates the list of files that should be installed at different locations. 276 setting, respectively. If your header is architecture-specific, then you should 278 should be installed for all architectures, then you should use a 469 implements a feature, you should define a new feature in `config/MASTER`
|
| /xnu-12377.41.6/san/memory/ |
| H A D | kasan-denylist | 1 # This file declares the list of source files that should be exempt from
|