VirtualBox

Ignore:
Timestamp:
Nov 4, 2019 12:10:50 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134407
Message:

Linux 5.4: no more arbitrary executable pages and more changes, ticketref:18945

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r80735 r81649  
    925925    {
    926926        skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i];
     927# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
     928        pSG->aSegs[iSeg].cb = pFrag->bv_len;
     929        pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
     930# else /* < KERNEL_VERSION(5, 4, 0) */
    927931        pSG->aSegs[iSeg].cb = pFrag->size;
    928932        pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
     933# endif /* >= KERNEL_VERSION(5, 4, 0) */
    929934        Log6((" %p", pSG->aSegs[iSeg].pv));
    930935        pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
     
    941946        {
    942947            skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i];
     948# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
     949            pSG->aSegs[iSeg].cb = pFrag->bv_len;
     950            pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
     951# else /* < KERNEL_VERSION(5, 4, 0) */
    943952            pSG->aSegs[iSeg].cb = pFrag->size;
    944953            pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
     954# endif /* >= KERNEL_VERSION(5, 4, 0) */
    945955            Log6((" %p", pSG->aSegs[iSeg].pv));
    946956            pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette