Changeset 40612 in vbox
- Timestamp:
- Mar 25, 2012 1:17:03 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77024
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp
r40611 r40612 130 130 //#define VERR_SUPDRV_VTG_RESERVED (-3705) 131 131 #define VERR_SUPDRV_VTG_BAD_HDR (-3706) 132 #define VERR_SUPDRV_VTG_BAD_HDR_PTR (-370 6)133 #define VERR_SUPDRV_VTG_BAD_HDR_TOO_FEW (-370 7)134 #define VERR_SUPDRV_VTG_BAD_HDR_TOO_MUCH (-370 8)135 #define VERR_SUPDRV_VTG_BAD_HDR_NOT_MULTIPLE (-37 09)136 #define VERR_SUPDRV_VTG_STRTAB_OFF (-37 09)137 #define VERR_SUPDRV_VTG_BAD_STRING (- 1111)138 #define VERR_SUPDRV_VTG_STRING_TOO_LONG (- 1111)139 #define VERR_SUPDRV_VTG_BAD_ATTR (- 1111)140 #define VERR_SUPDRV_VTG_BAD_PROVIDER (- 1111)141 #define VERR_SUPDRV_VTG_BAD_PROBE (- 1111)142 #define VERR_SUPDRV_VTG_BAD_ARGLIST (-37 09)143 #define VERR_SUPDRV_VTG_BAD_PROBE_ENABLED (- 1111)144 #define VERR_SUPDRV_VTG_BAD_PROBE_LOC (-37 09)145 #define VERR_SUPDRV_VTG_ALREADY_REGISTERED (- 1111)146 #define VERR_SUPDRV_VTG_ONLY_ONCE_PER_SESSION (- 1111)132 #define VERR_SUPDRV_VTG_BAD_HDR_PTR (-3707) 133 #define VERR_SUPDRV_VTG_BAD_HDR_TOO_FEW (-3708) 134 #define VERR_SUPDRV_VTG_BAD_HDR_TOO_MUCH (-3709) 135 #define VERR_SUPDRV_VTG_BAD_HDR_NOT_MULTIPLE (-3710) 136 #define VERR_SUPDRV_VTG_STRTAB_OFF (-3711) 137 #define VERR_SUPDRV_VTG_BAD_STRING (-3712) 138 #define VERR_SUPDRV_VTG_STRING_TOO_LONG (-3713) 139 #define VERR_SUPDRV_VTG_BAD_ATTR (-3714) 140 #define VERR_SUPDRV_VTG_BAD_PROVIDER (-3715) 141 #define VERR_SUPDRV_VTG_BAD_PROBE (-3716) 142 #define VERR_SUPDRV_VTG_BAD_ARGLIST (-3717) 143 #define VERR_SUPDRV_VTG_BAD_PROBE_ENABLED (-3718) 144 #define VERR_SUPDRV_VTG_BAD_PROBE_LOC (-3719) 145 #define VERR_SUPDRV_VTG_ALREADY_REGISTERED (-3720) 146 #define VERR_SUPDRV_VTG_ONLY_ONCE_PER_SESSION (-3721) 147 147 148 148 … … 157 157 if ( !RTLocCIsAlNum(ch) 158 158 && ch != ' ' 159 && ch != '_' 160 && ch != '-' 159 161 && ch != '(' 160 162 && ch != ')' … … 163 165 && ch != '&' 164 166 ) 167 { 168 /*RTAssertMsg2("off=%u '%s'\n", off, psz);*/ 165 169 return VERR_SUPDRV_VTG_BAD_STRING; 170 } 166 171 } 167 172 return VERR_SUPDRV_VTG_STRING_TOO_LONG; … … 195 200 do { \ 196 201 if ( (cb) >= cbVtgObj \ 197 || (uintptr_t)(p) - (uintptr_t)pVtgHdr <cbVtgObj - (cb) ) \202 || (uintptr_t)(p) - (uintptr_t)pVtgHdr > cbVtgObj - (cb) ) \ 198 203 return rcBase ## _PTR; \ 199 204 if ((cb) < (cMin) * (cbUnit)) \ … … 235 240 * The header. 236 241 */ 237 if ( !memcmp(pVtgHdr->szMagic, VTGOBJHDR_MAGIC, sizeof(pVtgHdr->szMagic)))242 if (memcmp(pVtgHdr->szMagic, VTGOBJHDR_MAGIC, sizeof(pVtgHdr->szMagic))) 238 243 return VERR_SUPDRV_VTG_MAGIC; 239 244 if (pVtgHdr->cBits != ARCH_BITS) … … 247 252 MY_VALIDATE_PTR(pVtgHdr->pachStrTab, pVtgHdr->cbStrTab, 4, _1M, sizeof(char), VERR_SUPDRV_VTG_BAD_HDR); 248 253 MY_VALIDATE_PTR(pVtgHdr->paArgLists, pVtgHdr->cbArgLists, 1, _32K, sizeof(uint32_t), VERR_SUPDRV_VTG_BAD_HDR); 254 249 255 MY_WITHIN_IMAGE(pVtgHdr->paProbLocs, VERR_SUPDRV_VTG_BAD_HDR_PTR); 250 256 MY_WITHIN_IMAGE(pVtgHdr->paProbLocsEnd, VERR_SUPDRV_VTG_BAD_HDR_PTR); … … 252 258 return VERR_SUPDRV_VTG_BAD_HDR_PTR; 253 259 cbTmp = (uintptr_t)pVtgHdr->paProbLocsEnd - (uintptr_t)pVtgHdr->paProbLocs; 254 MY_VALIDATE_PTR(pVtgHdr->paProbLocs, cbTmp, 1, _128K, sizeof(VTGPROBELOC), VERR_SUPDRV_VTG_BAD_HDR);255 260 if (cbTmp < sizeof(VTGPROBELOC)) 256 261 return VERR_SUPDRV_VTG_BAD_HDR_TOO_FEW; 262 if (cbTmp >= _128K * sizeof(VTGPROBELOC)) 263 return VERR_SUPDRV_VTG_BAD_HDR_TOO_MUCH; 264 if (cbTmp / sizeof(VTGPROBELOC) * sizeof(VTGPROBELOC) != cbTmp) 265 return VERR_SUPDRV_VTG_BAD_HDR_NOT_MULTIPLE; 257 266 258 267 if (pVtgHdr->cbProbes / sizeof(VTGDESCPROBE) != pVtgHdr->cbProbeEnabled) … … 298 307 return VERR_SUPDRV_VTG_BAD_PROBE; 299 308 if ( i - pVtgHdr->paProviders[pVtgHdr->paProbes[i].idxProvider].iFirstProbe 300 <pVtgHdr->paProviders[pVtgHdr->paProbes[i].idxProvider].cProbes)309 >= pVtgHdr->paProviders[pVtgHdr->paProbes[i].idxProvider].cProbes) 301 310 return VERR_SUPDRV_VTG_BAD_PROBE; 302 311 if (pVtgHdr->paProbes[i].u32User)
Note:
See TracChangeset
for help on using the changeset viewer.