History

landlock: Document init_layer_masks() helper

Add kernel-doc to the init_layer_masks() function.

Günther Noack committed 4 years ago

Commit 52a13481 parent 106794c1 file · +13 −0Browse files

Unified · Split

security/landlock/fs.c+13−0
@@ -297,6 +297,19 @@ get_handled_accesses(const struct landlock_ruleset *const domain) · 296 unmodified lines
297297 return access_dom & LANDLOCK_MASK_ACCESS_FS;
298298 }
299299
300+/**
301+ * init_layer_masks - Initialize layer masks from an access request
302+ *
303+ * Populates @layer_masks such that for each access right in @access_request,
304+ * the bits for all the layers are set where this access right is handled.
305+ *
306+ * @domain: The domain that defines the current restrictions.
307+ * @access_request: The requested access rights to check.
308+ * @layer_masks: The layer masks to populate.
309+ *
310+ * Returns: An access mask where each access right bit is set which is handled
311+ * in any of the active layers in @domain.
312+ */
300313 static inline access_mask_t
301314 init_layer_masks(const struct landlock_ruleset *const domain,
302315 const access_mask_t access_request,