equal
deleted
inserted
replaced
669 TInt DCodeSeg::Create(TCodeSegCreateInfo& aInfo, DProcess* aProcess) |
669 TInt DCodeSeg::Create(TCodeSegCreateInfo& aInfo, DProcess* aProcess) |
670 { |
670 { |
671 const TInt KValidAttrMask = |
671 const TInt KValidAttrMask = |
672 ECodeSegAttKernel | ECodeSegAttGlobal | ECodeSegAttFixed | ECodeSegAttABIMask | ECodeSegAttHDll | ECodeSegAttExpVer | ECodeSegAttNmdExpData | ECodeSegAttSMPSafe; |
672 ECodeSegAttKernel | ECodeSegAttGlobal | ECodeSegAttFixed | ECodeSegAttABIMask | ECodeSegAttHDll | ECodeSegAttExpVer | ECodeSegAttNmdExpData | ECodeSegAttSMPSafe; |
673 |
673 |
674 __KTRACE_OPT(KDLL,Kern::Printf("DCodeSeg::Create %08x file %lS ver %08x process %O",this,&aInfo.iFileName,aInfo.iModuleVersion,aProcess)); |
674 __KTRACE_OPT(KDLL,Kern::Printf("DCodeSeg::Create %08x file %S ver %08x process %O",this,&aInfo.iFileName,aInfo.iModuleVersion,aProcess)); |
675 TInt32 uid1=aInfo.iUids.iUid[0].iUid; |
675 TInt32 uid1=aInfo.iUids.iUid[0].iUid; |
676 if (uid1!=KDynamicLibraryUidValue && uid1!=KExecutableImageUidValue) |
676 if (uid1!=KDynamicLibraryUidValue && uid1!=KExecutableImageUidValue) |
677 return KErrNotSupported; |
677 return KErrNotSupported; |
678 iUids=aInfo.iUids; |
678 iUids=aInfo.iUids; |
679 iAttr=aInfo.iAttr & KValidAttrMask; |
679 iAttr=aInfo.iAttr & KValidAttrMask; |
1418 |
1418 |
1419 TInt ExecHandler::CodeSegCreate(TCodeSegCreateInfo& aInfo) |
1419 TInt ExecHandler::CodeSegCreate(TCodeSegCreateInfo& aInfo) |
1420 { |
1420 { |
1421 TCodeSegCreateInfo info; |
1421 TCodeSegCreateInfo info; |
1422 kumemget32(&info, &aInfo, sizeof(info)); |
1422 kumemget32(&info, &aInfo, sizeof(info)); |
1423 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::CodeSegCreate %lS ver %08x", &info.iFileName, info.iModuleVersion)); |
1423 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::CodeSegCreate %S ver %08x", &info.iFileName, info.iModuleVersion)); |
1424 __KTRACE_OPT(KDLL,DumpCodeSegCreateInfo(info)); |
1424 __KTRACE_OPT(KDLL,DumpCodeSegCreateInfo(info)); |
1425 K::CheckFileServerAccess(); // only F32 can use this exec function |
1425 K::CheckFileServerAccess(); // only F32 can use this exec function |
1426 info.iHandle=NULL; |
1426 info.iHandle=NULL; |
1427 DProcess* pP=OpenProcess(info.iClientProcessHandle, ETrue); |
1427 DProcess* pP=OpenProcess(info.iClientProcessHandle, ETrue); |
1428 TInt r=KErrNoMemory; |
1428 TInt r=KErrNoMemory; |
1446 |
1446 |
1447 TInt ExecHandler::CodeSegLoaded(TCodeSegCreateInfo& aInfo) |
1447 TInt ExecHandler::CodeSegLoaded(TCodeSegCreateInfo& aInfo) |
1448 { |
1448 { |
1449 TCodeSegCreateInfo info; |
1449 TCodeSegCreateInfo info; |
1450 kumemget32(&info, &aInfo, sizeof(info)); |
1450 kumemget32(&info, &aInfo, sizeof(info)); |
1451 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::CodeSegLoaded %lS ver %08x", &info.iFileName, info.iModuleVersion)); |
1451 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::CodeSegLoaded %S ver %08x", &info.iFileName, info.iModuleVersion)); |
1452 __KTRACE_OPT(KDLL,DumpCodeSegCreateInfo(info)); |
1452 __KTRACE_OPT(KDLL,DumpCodeSegCreateInfo(info)); |
1453 DCodeSeg* pS=DCodeSeg::VerifyCallerAndHandle(info.iHandle); |
1453 DCodeSeg* pS=DCodeSeg::VerifyCallerAndHandle(info.iHandle); |
1454 Kern::AccessCode(); |
1454 Kern::AccessCode(); |
1455 TInt r=pS->Loaded(info); |
1455 TInt r=pS->Loaded(info); |
1456 if (r==KErrNone) |
1456 if (r==KErrNone) |
1665 |
1665 |
1666 TInt ExecHandler::ProcessCreate(TProcessCreateInfo& aInfo, const TDesC* aCommandLine) |
1666 TInt ExecHandler::ProcessCreate(TProcessCreateInfo& aInfo, const TDesC* aCommandLine) |
1667 { |
1667 { |
1668 TProcessCreateInfo info; |
1668 TProcessCreateInfo info; |
1669 kumemget32(&info, &aInfo, sizeof(info)); |
1669 kumemget32(&info, &aInfo, sizeof(info)); |
1670 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::ProcessCreate %lS ver %08x", &info.iFileName, info.iModuleVersion)); |
1670 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::ProcessCreate %S ver %08x", &info.iFileName, info.iModuleVersion)); |
1671 __KTRACE_OPT(KDLL,DumpProcessCreateInfo(info)); |
1671 __KTRACE_OPT(KDLL,DumpProcessCreateInfo(info)); |
1672 K::CheckFileServerAccess(); // only F32 can use this exec function |
1672 K::CheckFileServerAccess(); // only F32 can use this exec function |
1673 if (info.iHandle) |
1673 if (info.iHandle) |
1674 DCodeSeg::VerifyHandleP(info.iHandle); |
1674 DCodeSeg::VerifyHandleP(info.iHandle); |
1675 info.iProcessHandle=0; |
1675 info.iProcessHandle=0; |
1792 |
1792 |
1793 TInt ExecHandler::ProcessLoaded(TProcessCreateInfo& aInfo) |
1793 TInt ExecHandler::ProcessLoaded(TProcessCreateInfo& aInfo) |
1794 { |
1794 { |
1795 TProcessCreateInfo info; |
1795 TProcessCreateInfo info; |
1796 kumemget32(&info, &aInfo, sizeof(info)); |
1796 kumemget32(&info, &aInfo, sizeof(info)); |
1797 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::ProcessLoaded %lS ver %08x", &info.iFileName, info.iModuleVersion)); |
1797 __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("Exec::ProcessLoaded %S ver %08x", &info.iFileName, info.iModuleVersion)); |
1798 __KTRACE_OPT(KDLL,DumpProcessCreateInfo(info)); |
1798 __KTRACE_OPT(KDLL,DumpProcessCreateInfo(info)); |
1799 K::CheckFileServerAccess(); // only F32 can use this exec function |
1799 K::CheckFileServerAccess(); // only F32 can use this exec function |
1800 NKern::LockSystem(); |
1800 NKern::LockSystem(); |
1801 DProcess* pP=(DProcess*)K::ThreadEnterCS(info.iProcessHandle, EProcess); |
1801 DProcess* pP=(DProcess*)K::ThreadEnterCS(info.iProcessHandle, EProcess); |
1802 TInt r=pP->Loaded(info); |
1802 TInt r=pP->Loaded(info); |