Lines Matching refs:cbReq
653 uint32_t cbReq = IOCPARM_LEN(iCmd);
657 if (RT_UNLIKELY(cbReq < sizeof(*pHdr)))
659 OSDBGPRINT(("VBoxDrvDarwinIOCtlSlow: cbReq=%#x < %#x; iCmd=%#lx\n", cbReq, (int)sizeof(*pHdr), iCmd));
667 if (RT_UNLIKELY( RT_MAX(pHdr->cbIn, pHdr->cbOut) != cbReq
671 OSDBGPRINT(("VBoxDrvDarwinIOCtlSlow: max(%#x,%#x) != %#x; iCmd=%#lx\n", pHdr->cbIn, pHdr->cbOut, cbReq, iCmd));
675 else if ((IOC_DIRMASK & iCmd) == IOC_VOID && !cbReq)
693 cbReq = RT_MAX(Hdr.cbIn, Hdr.cbOut);
696 || cbReq > _1M*16))
705 pHdr = (PSUPREQHDR)RTMemTmpAlloc(cbReq);
707 pvPageBuf = pHdr = (PSUPREQHDR)IOMallocAligned(RT_ALIGN_Z(cbReq, PAGE_SIZE), 8);
710 OSDBGPRINT(("VBoxDrvDarwinIOCtlSlow: failed to allocate buffer of %d bytes; iCmd=%#lx\n", cbReq, iCmd));
719 IOFreeAligned(pvPageBuf, RT_ALIGN_Z(cbReq, PAGE_SIZE));
724 if (Hdr.cbIn < cbReq)
725 RT_BZERO((uint8_t *)pHdr + Hdr.cbIn, cbReq - Hdr.cbIn);
729 Log(("VBoxDrvDarwinIOCtlSlow: huh? cbReq=%#x iCmd=%#lx\n", cbReq, iCmd));
736 int rc = supdrvIOCtl(iCmd, &g_DevExt, pSession, pHdr, cbReq);
745 if (cbOut > cbReq)
747 OSDBGPRINT(("VBoxDrvDarwinIOCtlSlow: too much output! %#x > %#x; uCmd=%#lx!\n", cbOut, cbReq, iCmd));
748 cbOut = cbReq;
757 IOFreeAligned(pvPageBuf, RT_ALIGN_Z(cbReq, PAGE_SIZE));
770 IOFreeAligned(pvPageBuf, RT_ALIGN_Z(cbReq, PAGE_SIZE));