lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v8 01/10] add basic task isolation prctl interface
On Wed, Dec 08, 2021 at 01:09:07PM -0300, Marcelo Tosatti wrote:
> +int __copy_task_isolation(struct task_struct *tsk)
> +{
> + struct isol_info *info, *new_info;
> +
> + info = current->isol_info;
> + if (!(info->inherit_mask & (ISOL_INHERIT_CONF|ISOL_INHERIT_ACTIVE)))
> + return 0;
> +
> + new_info = tsk_isol_alloc_context();
> + if (IS_ERR(new_info))
> + return PTR_ERR(new_info);
> +
> + new_info->inherit_mask = info->inherit_mask;

Ok then it might be worth mentioning in the docs that the inheritance
propagates to all the descendants and not just the immediate children,
unless the inheritance is explicitly reconfigured by some children of course.

> +
> + if (info->inherit_mask & ISOL_INHERIT_CONF) {
> + new_info->quiesce_mask = info->quiesce_mask;

Looks like if the parent has oneshot quiesce features configured, those
will be inherited as non-oneshot.

> + new_info->conf_mask = info->conf_mask;
> + }
> +
> + if (info->inherit_mask & ISOL_INHERIT_ACTIVE)
> + new_info->active_mask = info->active_mask;
> +
> + tsk->isol_info = new_info;
> +
> + return 0;
> +}

Other than that:

Acked-by: Frederic Weisbecker <frederic@kernel.org>

Thanks.

\
 
 \ /
  Last update: 2022-01-20 18:43    [W:0.059 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site