lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YfGNAXOpwTfKH01L@fuller.cnet>
Date:   Wed, 26 Jan 2022 15:03:45 -0300
From:   Marcelo Tosatti <mtosatti@...hat.com>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Nitesh Lal <nilal@...hat.com>,
        Nicolas Saenz Julienne <nsaenzju@...hat.com>,
        Christoph Lameter <cl@...ux.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Alex Belits <abelits@...its.com>, Peter Xu <peterx@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: Re: [patch v8 01/10] add basic task isolation prctl interface

On Thu, Jan 20, 2022 at 06:43:01PM +0100, Frederic Weisbecker wrote:
> 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.

v9 has:

**PR_ISOL_CFG_SET**:

        Set task isolation configuration.
        The general format is::

                prctl(PR_ISOL_CFG_SET, what, arg3, arg4, arg5);		

	...

                - Bit ISOL_INHERIT_ACTIVE: Inherit task isolation activation
                  (requires ISOL_INHERIT_CONF to be set). The new task
                  should behave, after fork/clone, in the same manner
                  as the parent task after it executed:

                        prctl(PR_ISOL_ACTIVATE_SET, &mask, ...);

                Note: the inheritance propagates to all the descendants and not
                just the immediate children, unless the inheritance is explicitly
                reconfigured by some children.

> 
> > +
> > +	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.

Good catch. v9 has:

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

> 
> > +		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@...nel.org>

OK, with the fixes above, i'll add your Acked-by to patches 1 and 2.
Let me know otherwise.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ