Re: [PATCH v3 05/12] landlock: Wrap per-layer access masks in struct layer_config

Tingmao Wang <[email protected]> Sun, 9 Aug 2026 17:01:22 +0100
Newsgroups gmane.linux.kernel.lsm,gmane.linux.file-systems,gmane.linux.kernel
Message-ID <[email protected]>
Reviewed-by: Tingmao Wang <[email protected]>

On 7/26/26 17:13, Mickaël Salaün wrote:
> [...]
> @@ -61,6 +61,20 @@ union access_masks_all {
>  static_assert(sizeof(typeof_member(union access_masks_all, masks)) ==
>  	      sizeof(typeof_member(union access_masks_all, all)));
>  
> +/**
> + * struct layer_config - Per-layer access configuration
> + *
> + * Wraps the per-layer handled-access bitfields.  This is the element type of
> + * the &struct landlock_ruleset.layers FAM.
> + */
> +struct layer_config {

This will be nice to have for the supervise stuff.

> +	/**
> +	 * @handled: Bitmask of access rights handled (i.e. restricted) by this
> +	 * layer.
> +	 */
> +	struct access_masks handled;
> +};
> +
>  /**
>   * struct layer_mask - The access rights and rule flags for a layer.
>   *