/DragonOS/kernel/src/bpf/helper/ |
H A D | mod.rs | 25 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_lookup_elem() 57 let data = core::slice::from_raw_parts(data as *const u8, size as usize); in raw_perf_event_output() 98 let dst = core::slice::from_raw_parts_mut(dst as *mut u8, size as usize); in raw_bpf_probe_read() 99 let src = core::slice::from_raw_parts(unsafe_ptr as *const u8, size as usize); in raw_bpf_probe_read() 128 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_update_elem() 129 let value = core::slice::from_raw_parts(value as *const u8, value_size); in raw_map_update_elem() 150 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_delete_elem() 218 let key = core::slice::from_raw_parts(key as *const u8, key_size); in raw_map_lookup_percpu_elem() 246 let value = core::slice::from_raw_parts(value as *const u8, value_size); in raw_map_push_elem() 267 let value = core::slice::from_raw_parts_mut(value as *mut u8, value_size); in raw_map_pop_elem() [all …]
|
/DragonOS/kernel/src/process/ |
H A D | exec.rs | 270 fn push_slice<T: Copy>(&self, ustack: &mut UserStack, slice: &[T]) -> Result<(), SystemError> { in push_slice() 272 sp -= core::mem::size_of_val(slice); in push_slice() 275 unsafe { core::slice::from_raw_parts_mut(sp.data() as *mut T, slice.len()) } in push_slice() 276 .copy_from_slice(slice); in push_slice()
|
/DragonOS/kernel/src/mm/allocator/ |
H A D | kernel_allocator.rs | 45 let slice = unsafe { in alloc_in_buddy() localVariable 46 core::slice::from_raw_parts_mut( in alloc_in_buddy() 51 return Ok(NonNull::from(slice)); in alloc_in_buddy()
|
/DragonOS/kernel/src/perf/ |
H A D | util.rs | 95 unsafe { core::slice::from_raw_parts(self as *const Self as *const u8, size_of::<Self>()) } in as_bytes() 108 unsafe { core::slice::from_raw_parts(self as *const Self as *const u8, size_of::<Self>()) } in as_bytes()
|
H A D | bpf.rs | 212 unsafe { core::slice::from_raw_parts(self.ptr as *const u8, self.size) } in as_slice() 215 unsafe { core::slice::from_raw_parts_mut(self.ptr as *mut u8, self.size) } in as_mut_slice()
|
H A D | kprobe.rs | 73 core::slice::from_raw_parts_mut( in call()
|
/DragonOS/kernel/src/driver/firmware/efi/ |
H A D | tables.rs | 58 let slice = in report_systable_header() localVariable 59 unsafe { core::slice::from_raw_parts(fw_ptr.data() as *const u16, TMPBUF_SIZE) }; in report_systable_header() 61 let val = slice[i]; in report_systable_header() 139 core::slice::from_raw_parts( in parse_config_tables()
|
/DragonOS/kernel/src/syscall/ |
H A D | user_access.rs | 6 slice::{from_raw_parts, from_raw_parts_mut}, 51 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user() 176 buffer: unsafe { core::slice::from_raw_parts(addr as *const u8, len) }, in new() 284 buffer: unsafe { core::slice::from_raw_parts_mut(addr as *mut u8, len) }, in new()
|
/DragonOS/kernel/crates/rbpf/src/ |
H A D | lib.rs | 1704 let slice = prog.leak(); in new() localVariable 1705 let slice = unsafe { core::slice::from_raw_parts(slice.as_ptr(), data_len) }; in new() localVariable 1706 (Some(slice), data_len, data_cap) in new() 1721 let slice = prog.leak(); in set_program() localVariable 1722 self.parent.set_program(slice)?; in set_program()
|
/DragonOS/kernel/src/sched/ |
H A D | fair.rs | 60 pub slice: u64, field 94 slice: SYSCTL_SHCED_BASE_SLICE.load(Ordering::SeqCst), in new() 477 let slice = self.sched_slice(entity.clone()); in sched_vslice() localVariable 478 return entity.calculate_delta_fair(slice); in sched_vslice() 490 let mut slice = Self::sched_period(nr_running + (!entity.on_rq()) as u64); in sched_slice() localVariable 498 slice = se in sched_slice() 502 .calculate_delta(slice, se.load.weight); in sched_slice() 511 slice = min_gran.max(slice) in sched_slice() 514 slice in sched_slice() 631 se.force_mut().slice = SYSCTL_SHCED_BASE_SLICE.load(Ordering::SeqCst); in update_deadline() [all …]
|
/DragonOS/kernel/src/arch/x86_64/process/ |
H A D | table.rs | 67 let gdt: &mut [u64] = core::slice::from_raw_parts_mut(gdt_vaddr.data() as *mut u64, 512); in set_tss_descriptor()
|
/DragonOS/kernel/src/libs/lib_ui/ |
H A D | screen_manager.rs | 170 unsafe { core::slice::from_raw_parts_mut(vaddr.data() as *mut u8, len) }; in copy_from_nonoverlapping() 174 unsafe { core::slice::from_raw_parts(vaddr.data() as *const u8, len) }; in copy_from_nonoverlapping() 190 core::slice::from_raw_parts(vaddr.data() as *const u8, len) in copy_from_nonoverlapping()
|
/DragonOS/kernel/src/bpf/map/ |
H A D | util.rs | 22 core::slice::from_raw_parts(u.map_name.as_ptr() as *const u8, u.map_name.len()) in try_from()
|
/DragonOS/kernel/src/bpf/prog/ |
H A D | util.rs | 94 core::slice::from_raw_parts(u.prog_name.as_ptr() as *const u8, u.prog_name.len()); in try_from()
|
/DragonOS/kernel/src/filesystem/overlayfs/ |
H A D | mod.rs | 46 let slice = unsafe { core::slice::from_raw_parts(raw_data, len) }; in from_row() localVariable 47 let raw_str = core::str::from_utf8(slice).map_err(|_| SystemError::EINVAL)?; in from_row()
|
/DragonOS/kernel/src/driver/video/fbdev/base/ |
H A D | render_helper.rs | 1 use core::slice::Iter;
|
/DragonOS/kernel/crates/bitmap/src/ |
H A D | alloc_bitmap.rs | 109 core::slice::from_raw_parts( in as_bytes()
|
H A D | static_bitmap.rs | 120 core::slice::from_raw_parts( in as_bytes()
|
/DragonOS/kernel/src/driver/video/fbdev/ |
H A D | vesafb.rs | 351 let slice = unsafe { core::slice::from_raw_parts(vaddr.as_ptr::<u8>(), size as usize) }; in fb_read() localVariable 352 buf[..len].copy_from_slice(&slice[pos as usize..(pos as usize + len)]); in fb_read() 372 let slice = unsafe { core::slice::from_raw_parts_mut(vaddr.as_ptr::<u8>(), size as usize) }; in fb_write() localVariable 373 slice[pos as usize..(pos as usize + len)].copy_from_slice(&buf[..len]); in fb_write()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | syscall.rs | 1826 let iovs: &[IoVec] = core::slice::from_raw_parts(iov, iovcnt); in from_user() 1841 slices.push(core::slice::from_raw_parts_mut(iov.iov_base, iov.iov_len)); in from_user() 1852 for slice in self.0.iter() { in gather() 1853 buf.extend_from_slice(slice); in gather() 1861 for slice in self.0.iter_mut() { in scatter() 1862 let len = core::cmp::min(slice.len(), data.len()); in scatter() 1867 slice[..len].copy_from_slice(&data[..len]); in scatter() 1880 let total_len: usize = self.0.iter().map(|slice| slice.len()).sum(); in new_buf()
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | vcpu_dev.rs | 174 core::slice::from_raw_parts_mut( in ioctl()
|
H A D | vm_dev.rs | 163 core::slice::from_raw_parts_mut( in ioctl()
|
/DragonOS/kernel/crates/klog_types/src/ |
H A D | lib.rs | 75 core::slice::from_raw_parts( in calculate_checksum()
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | mod.rs | 126 core::slice::from_raw_parts( in rsdp_paddr()
|
/DragonOS/kernel/src/arch/x86_64/mm/ |
H A D | mod.rs | 600 let slice = unsafe { in test_buddy() localVariable 601 core::slice::from_raw_parts_mut( in test_buddy() 606 for (i, item) in slice.iter_mut().enumerate() { in test_buddy()
|