Re: [PATCH v4 03/19] landlock: Split struct landlock_domain from struct landlock_ruleset
Günther Noack <[email protected]>
| Newsgroups | org.kernel.vger.linux-security-module,org.kernel.vger.linux-trace-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 11, 2026 at 11:43:17AM +0200, Mickaël Salaün wrote:
> @@ -45,34 +50,27 @@ static struct landlock_ruleset *create_ruleset(const u32 num_layers)
> new_ruleset->rules.root_net_port = RB_ROOT;
> #endif /* IS_ENABLED(CONFIG_INET) */
>
> - new_ruleset->num_layers = num_layers;
> - /*
> - * hierarchy = NULL
> - * rules.num_rules = 0
> - * access_masks[] = 0
> - */
> - return new_ruleset;
> -}
> + /* Should already be checked in landlock_create_ruleset(). */
This comment is now itself living within landlock_create_ruleset().
I believe this was inlined from the original function, maybe revisit?
> + if (fs_access_mask) {
> + const access_mask_t mask = fs_access_mask &
> + LANDLOCK_MASK_ACCESS_FS;
>
—Günther