File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,12 @@ unsafe impl ReadableFromBytes for isize {}
66
66
/// obtaining multiple readers on a given [`UserSlicePtr`], and the readers
67
67
/// only permitting forward reads.
68
68
///
69
- /// Constructing a [`UserSlicePtr`] only checks that the range is in valid
70
- /// userspace memory, and does not depend on the current process (and
71
- /// can safely be constructed inside a kernel thread with no current
72
- /// userspace process). Reads and writes wrap the kernel APIs
73
- /// `copy_from_user` and `copy_to_user`, and check the memory map of the
74
- /// current process .
69
+ /// Constructing a [`UserSlicePtr`] performs no checks on the provided
70
+ /// address and length, it can safely be constructed inside a kernel thread
71
+ /// with no current userspace process. Reads and writes wrap the kernel APIs
72
+ /// `copy_from_user` and `copy_to_user`, which check the memory map of the
73
+ /// current process and enforce that the address range is within the user
74
+ /// range (no additional calls to `access_ok` are needed) .
75
75
///
76
76
/// [`std::io`]: https://doc.rust-lang.org/std/io/index.html
77
77
pub struct UserSlicePtr ( * mut c_types:: c_void , usize ) ;
You can’t perform that action at this time.
0 commit comments