pub struct KernelFeatures {Show 13 fields
pub bpf_v2: bool,
pub enable_suid: bool,
pub io_uring: bool,
pub error_on_failed_reboot: bool,
pub default_seclabel: Option<String>,
pub selinux_test_suite: bool,
pub default_ns_mount_options: Option<HashMap<String, String>>,
pub default_uid: u32,
pub mlock_always_onfault: bool,
pub mlock_pin_flavor: MlockPinFlavor,
pub crash_report_throttling: bool,
pub wifi: bool,
pub cached_zx_map_info_bytes: u32,
}Fields§
§bpf_v2: bool§enable_suid: boolWhether the kernel supports the S_ISUID and S_ISGID bits.
For example, these bits are used by sudo.
Enabling this feature is potentially a security risk because they allow privilege escalation.
io_uring: boolWhether io_uring is enabled.
TODO(https://fxbug.dev/297431387): Enabled by default once the feature is completed.
error_on_failed_reboot: boolWhether the kernel should return an error to userspace, rather than panicking, if reboot()
is requested but cannot be enacted because the kernel lacks the relevant capabilities.
default_seclabel: Option<String>The default seclabel that is applied to components that are run in this kernel.
Components can override this by setting the seclabel field in their program block.
selinux_test_suite: boolWhether the kernel is being used to run the SELinux Test Suite.
TODO: https://fxbug.dev/388077431 - remove this once we no longer need workarounds for the SELinux Test Suite.
default_ns_mount_options: Option<HashMap<String, String>>The default mount options to use when mounting directories from a component’s namespace.
The key is the path in the component’s namespace, and the value is the mount options string.
default_uid: u32The default uid that is applied to components that are run in this kernel.
Components can override this by setting the uid field in their program block.
mlock_always_onfault: boolmlock() never prefaults pages.
mlock_pin_flavor: MlockPinFlavorImplementation of mlock() to use for this kernel instance.
crash_report_throttling: boolWhether excessive crash reports should be throttled.
wifi: boolWhether or not to serve wifi support to Android.
cached_zx_map_info_bytes: u32The number of bytes to cache in pages for reading zx::MapInfo from VMARs.
Implementations§
Source§impl KernelFeatures
impl KernelFeatures
Sourcepub fn ns_mount_options(&self, ns_path: &str) -> Result<MountParams, Errno>
pub fn ns_mount_options(&self, ns_path: &str) -> Result<MountParams, Errno>
Returns the MountParams to use when mounting the specified path from a component’s
namespace. This mechanism is also used to specified options for mounts created via
container features, by specifying a pseudo-path e.g. “#container”.
Trait Implementations§
Source§impl Clone for KernelFeatures
impl Clone for KernelFeatures
Source§fn clone(&self) -> KernelFeatures
fn clone(&self) -> KernelFeatures
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KernelFeatures
impl Debug for KernelFeatures
Source§impl Default for KernelFeatures
impl Default for KernelFeatures
Source§fn default() -> KernelFeatures
fn default() -> KernelFeatures
Auto Trait Implementations§
impl Freeze for KernelFeatures
impl RefUnwindSafe for KernelFeatures
impl Send for KernelFeatures
impl Sync for KernelFeatures
impl Unpin for KernelFeatures
impl UnwindSafe for KernelFeatures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more