Skip to content

Commit ef7b3ff

Browse files
committed
Improve comments.
1 parent b6da36f commit ef7b3ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rust/kernel/user_ptr.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@ unsafe impl ReadableFromBytes for i32 {}
4646
unsafe impl ReadableFromBytes for i64 {}
4747
unsafe impl ReadableFromBytes for isize {}
4848

49-
/// Specifies that a type can be safely writable to byte slices.
49+
/// Specifies that a type is safely writable to byte slices.
5050
///
51-
/// This means that we don't read undefined values when reading the memory contents (which leads to
52-
/// UB). It also ensures that no potentially sensitive information is leaked into the byte slices.
51+
/// This means that we don't read undefined values (which leads to UB) in preparation for writing
52+
/// to the byte slice. It also ensures that no potentially sensitive information is leaked into the
53+
/// byte slices.
5354
///
5455
/// # Safety
5556
///
56-
/// A type must not include padding bytes and must be fully initialsed to safely implement
57+
/// A type must not include padding bytes and must be fully initialised to safely implement
5758
/// [`WritableToBytes`] (i.e., it doesn't contain [`MaybeUninit`] fields). A composition of
5859
/// writable types in a structure is not necessarily writable because it may result in padding
5960
/// bytes.

0 commit comments

Comments
 (0)