Esempio n. 1
0
        internal void UpdateAccessRights(AddressSpace space, uint newAccess)
        {
            if (Access == newAccess)
                return;

            Arch.NativeMethods.l4api_flush_regions(space.impl._value, StartAddress, End, (int)(~newAccess & FAULT_MASK));
            Access = newAccess;
        }
Esempio n. 2
0
        internal Process(ASCIIString name, AndroidApplicationInfo appInfo)
        {
            Contract.Ensures(Credential.GhostOwner == this);
            Contract.Ensures(Space.GhostOwner == this);
            Contract.Ensures(Files.GhostOwner == this);

            this.AppInfo = appInfo;
            SFSFilePrefix = Util.StringToByteArray(appInfo.DataDir, false);

            this.Files = new FileDescriptorTable(this);

            const uint UTCB_BOTTOM = 0xc0000000;
            var utcb = new Pointer(UTCB_BOTTOM);

            // TODO: expose interface to change the name of the process
            var archAddressSpace = Arch.ArchAddressSpace.Create(name, utcb,
                Arch.ArchDefinition.UTCBSizeShift + Arch.ArchDefinition.MaxThreadPerTaskLog2);
            this.Space = new AddressSpace(this, archAddressSpace);
            this.Credential = SecurityManager.GetCredential(name, this);
        }
Esempio n. 3
0
        internal Process(ASCIIString name, AndroidApplicationInfo appInfo)
        {
            Contract.Ensures(Credential.GhostOwner == this);
            Contract.Ensures(Space.GhostOwner == this);
            Contract.Ensures(Files.GhostOwner == this);

            this.AppInfo  = appInfo;
            SFSFilePrefix = Util.StringToByteArray(appInfo.DataDir, false);

            this.Files = new FileDescriptorTable(this);

            const uint UTCB_BOTTOM = 0xc0000000;
            var        utcb        = new Pointer(UTCB_BOTTOM);

            // TODO: expose interface to change the name of the process
            var archAddressSpace = Arch.ArchAddressSpace.Create(name, utcb,
                                                                Arch.ArchDefinition.UTCBSizeShift + Arch.ArchDefinition.MaxThreadPerTaskLog2);

            this.Space      = new AddressSpace(this, archAddressSpace);
            this.Credential = SecurityManager.GetCredential(name, this);
        }