comment shm
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 13:43:48 +0000 (09:43 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 13:43:48 +0000 (09:43 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/shm.h

index 9f72a5a248657f73c3176877d2e6357930dd10db..22c9afdcbd2beaf557aa894ca37cd975908f3b37 100644 (file)
 /*
  * 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,
This page took 0.026629 seconds and 4 git commands to generate.