From: Mathieu Desnoyers Date: Sat, 20 Aug 2011 13:43:48 +0000 (-0400) Subject: comment shm X-Git-Tag: v1.9.1~294 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=ed5426d36fe2da648b4b16ec8173398558d8490f;p=lttng-ust.git comment shm Signed-off-by: Mathieu Desnoyers --- diff --git a/libringbuffer/shm.h b/libringbuffer/shm.h index 9f72a5a2..22c9afdc 100644 --- a/libringbuffer/shm.h +++ b/libringbuffer/shm.h @@ -17,6 +17,11 @@ /* * Pointer dereferencing. We don't trust the shm_ref, so we validate * both the index and offset with known boundaries. + * + * "shmp" and "shmp_index" guarantee that it's safe to use the pointer + * target type, even in the occurrence of shm_ref modification by an + * untrusted process having write access to the shm_ref. We return a + * NULL pointer if the ranges are invalid. */ static inline char *_shmp_offset(struct shm_object_table *table, struct shm_ref *ref,