Changeset 40886 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Apr 12, 2012 12:13:37 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp
r40881 r40886 319 319 pArgList = (PVTGDESCARGLIST)((uintptr_t)pVtgHdr->paArgLists + pVtgHdr->paProbes[i].offArgList); 320 320 if (pArgList->cArgs > 16) 321 { 322 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - iProbe=%u cArgs=%u\n", i, pArgList->fHaveLargeArgs, pArgList->cArgs); 321 323 return VERR_SUPDRV_VTG_BAD_ARGLIST; 324 } 322 325 if (pArgList->fHaveLargeArgs >= 2) 326 { 327 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - iProbe=%u fHaveLargeArgs=%d\n", i, pArgList->fHaveLargeArgs); 323 328 return VERR_SUPDRV_VTG_BAD_ARGLIST; 329 } 324 330 if ( pArgList->abReserved[0] 325 331 || pArgList->abReserved[1]) 332 { 333 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - reserved MBZ iProbe=%u\n", i); 326 334 return VERR_SUPDRV_VTG_BAD_ARGLIST; 335 } 327 336 fHaveLargeArgs = false; 328 337 iArg = pArgList->cArgs; 329 338 while (iArg-- > 0) 330 339 { 331 rc = VINF_SUCCESS; 332 MY_VALIDATE_STR(pArgList->aArgs[iArg].offType); 340 uint32_t const fType = pArgList->aArgs[iArg].fType; 341 if (fType & ~VTG_TYPE_VALID_MASK) 342 { 343 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - fType=%#x iArg=%u iProbe=%u (#0)\n", fType, iArg, i); 344 return VERR_SUPDRV_TRACER_BAD_ARG_FLAGS; 345 } 346 333 347 switch (pArgList->aArgs[iArg].fType & VTG_TYPE_SIZE_MASK) 334 348 { 335 349 case 0: 336 350 if (pArgList->aArgs[iArg].fType & VTG_TYPE_FIXED_SIZED) 337 rc = VERR_SUPDRV_TRACER_BAD_ARG_FLAGS; 351 { 352 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - fType=%#x iArg=%u iProbe=%u (#1)\n", fType, iArg, i); 353 return VERR_SUPDRV_TRACER_BAD_ARG_FLAGS; 354 } 338 355 break; 339 356 case 1: case 2: case 4: case 8: 340 357 break; 341 358 default: 342 rc = VERR_SUPDRV_TRACER_BAD_ARG_FLAGS; 359 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - fType=%#x iArg=%u iProbe=%u (#2)\n", fType, iArg, i); 360 return VERR_SUPDRV_TRACER_BAD_ARG_FLAGS; 343 361 } 344 if (RT_FAILURE(rc)) 345 { 346 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - fType=%#x iArg=%u iProbe=%u\n", 347 pArgList->aArgs[iArg].fType, iArg, i); 348 return rc; 349 } 350 if (VTG_TYPE_IS_LARGE(pArgList->aArgs[iArg].fType) && iArg >= 5) 362 if (VTG_TYPE_IS_LARGE(pArgList->aArgs[iArg].fType)) 351 363 fHaveLargeArgs = true; 364 365 MY_VALIDATE_STR(pArgList->aArgs[iArg].offType); 352 366 } 353 367 if ((uint8_t)fHaveLargeArgs != pArgList->fHaveLargeArgs) 354 368 { 355 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - fType=%#xiProbe=%u fHaveLargeArgs=%d expected %d\n",356 pArgList->aArgs[iArg].fType,i, pArgList->fHaveLargeArgs, fHaveLargeArgs);369 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_TRACER_BAD_ARG_FLAGS - iProbe=%u fHaveLargeArgs=%d expected %d\n", 370 i, pArgList->fHaveLargeArgs, fHaveLargeArgs); 357 371 return VERR_SUPDRV_VTG_BAD_PROBE; 358 372 }
Note:
See TracChangeset
for help on using the changeset viewer.