Skip to content

Commit 472181f

Browse files
committed
Update comments.
1 parent bec2fec commit 472181f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rust/kernel/user_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ unsafe impl ReadableFromBytes for isize {}
6666
/// obtaining multiple readers on a given [`UserSlicePtr`], and the readers
6767
/// only permitting forward reads.
6868
///
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).
7575
///
7676
/// [`std::io`]: https://doc.rust-lang.org/std/io/index.html
7777
pub struct UserSlicePtr(*mut c_types::c_void, usize);

0 commit comments

Comments
 (0)