All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usercopy: Improve comments after reorder
@ 2019-01-03 16:51 Kees Cook
  0 siblings, 0 replies; only message in thread
From: Kees Cook @ 2019-01-03 16:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Qian Cai

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

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 mm/usercopy.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/mm/usercopy.c b/mm/usercopy.c
index e9e9325f7638..726e570c9b9e 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -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)

-- 
Kees Cook

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-03 16:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-03 16:51 [PATCH] usercopy: Improve comments after reorder Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.