Changeset 26124 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 1, 2010 2:30:36 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r23916 r26124 1308 1308 if (pInfo->cParms > 4096) /* (Just make sure it doesn't overflow the next check.) */ 1309 1309 { 1310 Log (("VBoxGuestCommonIOCtl: HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));1310 LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms)); 1311 1311 return VERR_INVALID_PARAMETER; 1312 1312 } … … 1320 1320 if (cbData < cbActual) 1321 1321 { 1322 Log (("VBoxGuestCommonIOCtl: HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",1322 LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n", 1323 1323 cbData, cbActual)); 1324 1324 return VERR_INVALID_PARAMETER; … … 1376 1376 } 1377 1377 else 1378 Log (("VBoxGuestCommonIOCtl: HGCM_CALL: Failed. rc=%Rrc.\n", rc));1378 LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32Bit ? "32" : "64", rc)); 1379 1379 return rc; 1380 1380 } … … 1498 1498 if (pSession->R0Process != NIL_RTR0PROCESS) \ 1499 1499 { \ 1500 Log (("VBoxGuestCommonIOCtl: " mnemonic ": Ring-0 only, caller is %RTproc/%p\n", \1500 LogRel(("VBoxGuestCommonIOCtl: " mnemonic ": Ring-0 only, caller is %RTproc/%p\n", \ 1501 1501 pSession->Process, (uintptr_t)pSession->R0Process)); \ 1502 1502 return VERR_PERMISSION_DENIED; \ … … 1507 1507 if (cbData < (cbMin)) \ 1508 1508 { \ 1509 Log (("VBoxGuestCommonIOCtl: " mnemonic ": cbData=%#zx (%zu) min is %#zx (%zu)\n", \1509 LogRel(("VBoxGuestCommonIOCtl: " mnemonic ": cbData=%#zx (%zu) min is %#zx (%zu)\n", \ 1510 1510 cbData, cbData, (size_t)(cbMin), (size_t)(cbMin))); \ 1511 1511 return VERR_BUFFER_OVERFLOW; \ … … 1513 1513 if ((cbMin) != 0 && !VALID_PTR(pvData)) \ 1514 1514 { \ 1515 Log (("VBoxGuestCommonIOCtl: " mnemonic ": Invalid pointer %p\n", pvData)); \1515 LogRel(("VBoxGuestCommonIOCtl: " mnemonic ": Invalid pointer %p\n", pvData)); \ 1516 1516 return VERR_INVALID_POINTER; \ 1517 1517 } \ … … 1626 1626 default: 1627 1627 { 1628 Log (("VBoxGuestCommonIOCtl: Unknown request iFunction=%#x Stripped size=%#x\n", iFunction,1628 LogRel(("VBoxGuestCommonIOCtl: Unknown request iFunction=%#x Stripped size=%#x\n", iFunction, 1629 1629 VBOXGUEST_IOCTL_STRIP_SIZE(iFunction))); 1630 1630 rc = VERR_NOT_SUPPORTED; -
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
r23610 r26124 895 895 rc = vbglR0HGCMInternalCopyBackResult(pCallInfo, pHGCMCall, &ParmInfo, fIsUser, rc); 896 896 } 897 else 898 LogRel(("VbglR0HGCMInternalCall: vbglR0HGCMInternalDoCall failed. rc=%Rrc\n", rc)); 897 899 898 900 if (!fLeakIt) … … 900 902 } 901 903 } 904 else 905 LogRel(("VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=%Rrc\n", rc)); 902 906 903 907 /* … … 921 925 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData) 922 926 { 923 VBoxGuestHGCMCallInfo *pCallInfo64 ;924 HGCMFunctionParameter *pParm64 ;925 HGCMFunctionParameter32 *pParm32 ;926 uint32_t cParms ;927 uint32_t iParm ;928 int rc;927 VBoxGuestHGCMCallInfo *pCallInfo64 = NULL; 928 HGCMFunctionParameter *pParm64 = NULL; 929 HGCMFunctionParameter32 *pParm32 = NULL; 930 uint32_t cParms = 0; 931 uint32_t iParm = 0; 932 int rc = VINF_SUCCESS; 929 933 930 934 /* … … 936 940 || !(fFlags & ~VBGLR0_HGCMCALL_F_MODE_MASK), 937 941 ("pCallInfo=%p pfnAsyncCallback=%p fFlags=%#x\n", pCallInfo, pfnAsyncCallback, fFlags), 938 VERR_INVALID_ PARAMETER);942 VERR_INVALID_HANDLE); 939 943 AssertReturn( cbCallInfo >= sizeof(VBoxGuestHGCMCallInfo) 940 944 || cbCallInfo >= pCallInfo->cParms * sizeof(HGCMFunctionParameter32), 941 VERR_INVALID_PARAMETER); 942 AssertReturn((fFlags & VBGLR0_HGCMCALL_F_MODE_MASK) == VBGLR0_HGCMCALL_F_KERNEL, VERR_INVALID_PARAMETER); 945 VERR_INVALID_MAGIC); 946 947 /* This Assert does not work on Solaris 64/32 mixed mode, not sure why, skipping for now */ 948 #ifndef RT_OS_SOLARIS 949 AssertReturn((fFlags & VBGLR0_HGCMCALL_F_MODE_MASK) == VBGLR0_HGCMCALL_F_KERNEL, VERR_WRONG_ORDER); 950 #endif 943 951 944 952 cParms = pCallInfo->cParms; … … 979 987 default: 980 988 rc = VERR_INVALID_PARAMETER; 989 LogRel(("VbglR0HGCMInternalCall32: pParm32 type %#x invalid.\n", pParm32->type)); 981 990 break; 982 991 } … … 989 998 pfnAsyncCallback, pvAsyncData, u32AsyncData); 990 999 991 /* 992 * Copy back. 993 */ 994 for (iParm = 0; iParm < cParms; iParm++, pParm32++, pParm64++) 1000 if (RT_SUCCESS(rc)) 995 1001 { 996 switch (pParm32->type) 1002 *pCallInfo = *pCallInfo64; 1003 1004 /* 1005 * Copy back. 1006 */ 1007 pParm32 = VBOXGUEST_HGCM_CALL_PARMS32(pCallInfo); 1008 pParm64 = VBOXGUEST_HGCM_CALL_PARMS(pCallInfo64); 1009 for (iParm = 0; iParm < cParms; iParm++, pParm32++, pParm64++) 997 1010 { 998 case VMMDevHGCMParmType_32bit: 999 pParm32->u.value32 = pParm32->u.value32; 1000 break; 1001 1002 case VMMDevHGCMParmType_64bit: 1003 pParm32->u.value64 = pParm64->u.value64; 1004 break; 1005 1006 case VMMDevHGCMParmType_LinAddr_Out: 1007 case VMMDevHGCMParmType_LinAddr: 1008 case VMMDevHGCMParmType_LinAddr_In: 1009 pParm32->u.Pointer.size = pParm64->u.Pointer.size; 1010 break; 1011 1012 default: 1013 rc = VERR_INTERNAL_ERROR_3; 1014 break; 1011 LogRel(("VbglR0HGCMInternalCall32: iParm=%d cParms=%d\n",iParm, cParms)); 1012 switch (pParm64->type) 1013 { 1014 case VMMDevHGCMParmType_32bit: 1015 LogRel(("pParm32->u.value32=%d\n", pParm32->u.value32)); 1016 pParm32->u.value32 = pParm64->u.value32; 1017 break; 1018 1019 case VMMDevHGCMParmType_64bit: 1020 pParm32->u.value64 = pParm64->u.value64; 1021 break; 1022 1023 case VMMDevHGCMParmType_LinAddr_Out: 1024 case VMMDevHGCMParmType_LinAddr: 1025 case VMMDevHGCMParmType_LinAddr_In: 1026 pParm32->u.Pointer.size = pParm64->u.Pointer.size; 1027 break; 1028 1029 default: 1030 LogRel(("VbglR0HGCMInternalCall32: failed invalid pParm32 type %d\n", pParm32->type)); 1031 rc = VERR_INTERNAL_ERROR_3; 1032 break; 1033 } 1015 1034 } 1016 1035 } 1017 *pCallInfo = *pCallInfo64; 1018 } 1036 else 1037 LogRel(("VbglR0HGCMInternalCall32: VbglR0HGCMInternalCall failed. rc=%Rrc\n", rc)); 1038 } 1039 else 1040 LogRel(("VbglR0HGCMInternalCall32: failed. rc=%Rrc\n", rc)); 1019 1041 1020 1042 RTMemTmpFree(pCallInfo64);
Note:
See TracChangeset
for help on using the changeset viewer.