Skip to contentSkip to conversation

usercopy: Improve comments after reorder

PATCH New Kees Cook 1 participant 1 message Jan 3, 2019

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 usercopy: Improve comments after reorder

This updates the comments to better reflect the order and purpose of the checks.

---
 mm/usercopy.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
mm/usercopy.c +2 -1
index e9e9325f7638..726e570c9b9e 100644
@@ -243,7 +243,8 @@ static inline void check_heap_object(const void *ptr, unsigned long n,
 /*
  * Validates that the given object is:
  * - not bogus address
- * - known-safe heap or stack object
+ * - fully contained by stack (or stack frame, when available)
+ * - fully within SLAB object (or object whitelist area, when available)
  * - not in kernel text
  */
 void __check_object_size(const void *ptr, unsigned long n, bool to_user)
Signature · 1 line
Kees Cook