Add kernel-doc to the init_layer_masks() function.
Unified · Split
| @@ -297,6 +297,19 @@ get_handled_accesses(const struct landlock_ruleset *const domain) · 296 unmodified lines | ||
| 297 | 297 | return access_dom & LANDLOCK_MASK_ACCESS_FS; |
| 298 | 298 | } |
| 299 | 299 | |
| 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 | + */ | |
| 300 | 313 | static inline access_mask_t |
| 301 | 314 | init_layer_masks(const struct landlock_ruleset *const domain, |
| 302 | 315 | const access_mask_t access_request, |