mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Budnik <abud...@mesosphere.com>
Subject Re: Review Request 70757: Added a NNP isolator.
Date Mon, 15 Jul 2019 12:51:56 GMT


> On Июль 15, 2019, 12:08 д.п., James Peach wrote:
> > src/slave/containerizer/mesos/launch.cpp
> > Lines 1162 (patched)
> > <https://reviews.apache.org/r/70757/diff/7/?file=2154556#file2154556line1163>
> >
> >     As per Andrei, if the message field is present, toggle the NNP flag depending
on its value. e.g.
> >     ```
> >     int value = launchInfo.no_new_privileges() ? 1 : 0;
> >     
> >     prctl(PR_SET_NO_NEW_PRIVS, value, 0, 0, 0)
> >     ```

`man prctl` states:
```
Once set, this bit cannot be unset.
```
An attempt to unset this bit returns an error, if the bit was previously set.


I meant that a framework may set this flag to `false`, meaning that the NNP isolator is supposed
to disable this flag (in the `prepare` method) - that would allow a framework to not set a
NNP flag for a particular container even if the NNP isolator enables it by default for all
containers. Imagine a situation when a container can't be launched because of a NNP flag set.
It'd be very desirable for a framework to support overriding of `nnp` flag similarly to how
other isolators (including `linux/seccomp`) handle their flags provided by a framework.


- Andrei


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70757/#review216599
-----------------------------------------------------------


On Июль 11, 2019, 11:14 п.п., Jacob Janco wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70757/
> -----------------------------------------------------------
> 
> (Updated Июль 11, 2019, 11:14 п.п.)
> 
> 
> Review request for mesos, Andrei Budnik, Gilbert Song, Jie Yu, and James Peach.
> 
> 
> Bugs: MESOS-9770
>     https://issues.apache.org/jira/browse/MESOS-9770
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds the isolation capability of flipping the
> NO_NEW_PRIVILEGES bit for process control.
> 
> 
> Diffs
> -----
> 
>   include/mesos/slave/containerizer.proto 2d04f3c182a4274dda527a3da56c894c3c892a12 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/containerizer.cpp c9a369bcdbfc1676912430c3e84fa567bbd7f766

>   src/slave/containerizer/mesos/isolators/linux/nnp.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/linux/nnp.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/launch.cpp 0419e8e0fbf154396ab5fb5026d77b94cc9fca5b 
>   src/tests/CMakeLists.txt 5eb9c65f30d9d6ade289f9d47b18d73908b1f1db 
>   src/tests/containerizer/linux_nnp_isolator_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70757/diff/7/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jacob Janco
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message