# Re: \[PATCH v2 03/12\] task\_isolation: userspace hard isolation from kernel

- From: Marta Rybczynska \<hidden\>
- Date: 2020-03-27 08:43:10 
- List: netdev
- Page: https://ratatoskr.run/netdev/2020/03/5909428
- Thread: https://ratatoskr.run/linux-api/2020/03/5884449/t.md

```text
On Sun, Mar 8, 2020 at 4:48 AM Alex Belits [ref] wrote:
> +/* Enable task_isolation mode for TASK_ISOLATION kernels. */
> +#define PR_TASK_ISOLATION              48
> +# define PR_TASK_ISOLATION_ENABLE      (1 << 0)
> +# define PR_TASK_ISOLATION_SET_SIG(sig)        (((sig) & 0x7f) << 8)
> +# define PR_TASK_ISOLATION_GET_SIG(bits) (((bits) >> 8) & 0x7f)
> +
Thank you for resurrecting this code!

I have a question on the UAPI: the example code is using
PR_TASK_ISOLATION_USERSIG and it seems to be removed from this
version.

To enable isolation with SIGUSR1 the task should run:
prctl(PR_SET_TASK_ISOLATION, PR_TASK_ISOLATION_ENABLE
    | PR_TASK_ISOLATION_SET_SIG(SIGUSR1), 0, 0, 0);

And to disable:
prctl(PR_SET_TASK_ISOLATION, 0, 0, 0, 0);

Is this correct?
Marta
```
