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

Function cvm_page_copyback

freebsd/opencrypto/criov.c:196–214  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

194 * Does not verify the length of the array.
195 */
196static int
197cvm_page_copyback(vm_page_t *pages, int off, int len, c_caddr_t cp)
198{
199 int processed = 0;
200 unsigned count;
201
202 CVM_PAGE_SKIP();
203 while (len > 0) {
204 count = min(PAGE_SIZE - off, len);
205 bcopy(cp, (char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(*pages)) + off,
206 count);
207 len -= count;
208 cp += count;
209 processed += count;
210 off = 0;
211 pages++;
212 }
213 return (processed);
214}
215
216/*
217 * Copy len bytes of data from the pointer cp into the vm_page_t array,

Callers 1

crypto_copybackFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected