MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cvm_page_copydata

Function cvm_page_copydata

freebsd/opencrypto/criov.c:221–239  ·  view source on GitHub ↗

* Copy len bytes of data from the pointer cp into the vm_page_t array, * skipping the first off bytes, Return the number of bytes skipped and copied. * Does not verify the length of the array. */

Source from the content-addressed store, hash-verified

219 * Does not verify the length of the array.
220 */
221static int
222cvm_page_copydata(vm_page_t *pages, int off, int len, caddr_t cp)
223{
224 int processed = 0;
225 unsigned count;
226
227 CVM_PAGE_SKIP();
228 while (len > 0) {
229 count = min(PAGE_SIZE - off, len);
230 bcopy(((char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages)) + off), cp,
231 count);
232 len -= count;
233 cp += count;
234 processed += count;
235 off = 0;
236 pages++;
237 }
238 return processed;
239}
240#endif /* CRYPTO_MAY_HAVE_VMPAGE */
241
242void

Callers 1

crypto_copydataFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected