pub fn sys_vmo_replace_as_executable(
        &self,
        handle: HandleValue,
        vmex: HandleValue,
        mut out: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "vmo.replace_as_executable: handle={:#x?}, vmex={:#x?}",
            handle, vmex
        );
        let proc = self.thread.proc();
        if vmex != INVALID_HANDLE {
            proc.get_object::<Resource>(vmex)?
                .validate(ResourceKind::VMEX)?;
        } else {
            proc.check_policy(PolicyCondition::AmbientMarkVMOExec)?;
        }
        let _ = proc.get_object_and_rights::<VmObject>(handle)?;
        let new_handle = proc.dup_handle_operating_rights(handle, |handle_rights| {
            Ok(handle_rights | Rights::EXECUTE)
        })?;
        proc.remove_handle(handle)?;
        out.write(new_handle)?;
        Ok(())
    }
/// Add execute rights to a VMO.
Add execute rights to a VMO.
Add execute rights to a VMO .
pub fn sys_vmo_replace_as_executable(
        &self,
        handle: HandleValue,
        vmex: HandleValue,
        mut out: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "vmo.replace_as_executable: handle={:#x?}, vmex={:#x?}",
            handle, vmex
        );
        let proc = self.thread.proc();
        if vmex != INVALID_HANDLE {
            proc.get_object::<Resource>(vmex)?
                .validate(ResourceKind::VMEX)?;
        } else {
            proc.check_policy(PolicyCondition::AmbientMarkVMOExec)?;
        }
        let _ = proc.get_object_and_rights::<VmObject>(handle)?;
        let new_handle = proc.dup_handle_operating_rights(handle, |handle_rights| {
            Ok(handle_rights | Rights::EXECUTE)
        })?;
        proc.remove_handle(handle)?;
        out.write(new_handle)?;
        Ok(())
    }
pub fn sys_vmo_replace_as_executable ( & self , handle : HandleValue , vmex : HandleValue , mut out : UserOutPtr < HandleValue > , ) -> ZxResult { info ! ( " " handle vmex ) ; let proc = self . thread . proc ( ) ; if vmex != INVALID_HANDLE { proc . get_object :: < Resource > ( vmex ) ? . validate ( ResourceKind :: VMEX ) ? ; } else { proc . check_policy ( PolicyCondition :: AmbientMarkVMOExec ) ? ; } let _ = proc . get_object_and_rights :: < VmObject > ( handle ) ? ; let new_handle = proc . dup_handle_operating_rights ( handle , | handle_rights | { Ok ( handle_rights | Rights :: EXECUTE ) } ) ? ; proc . remove_handle ( handle ) ? ; out . write ( new_handle ) ? ; Ok ( ( ) ) }
Add execute rights to a VMO.
Add execute rights to a VMO .
&self
handle
HandleValue
vmex
HandleValue
out
UserOutPtr<HandleValue>
&self
handle
HandleValue
vmex
HandleValue
out
UserOutPtr<HandleValue>