VirtualBox

Ignore:
Timestamp:
Dec 8, 2020 1:52:53 PM (4 years ago)
Author:
vboxsync
Message:

linser/vboxsf: Adjustment for linux 5.10 - TASK_SIZE_MAX replaces USER_DS.seg. bugref:9879

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r85703 r87053  
    148148        if (paIov->iov_len > 0) {
    149149            if (access_ok(VERIFY_READ, paIov->iov_base, paIov->iov_len))
     150#if RTLNX_VER_MIN(5,10,0)
     151                return (uintptr_t)paIov->iov_base >= TASK_SIZE_MAX ? ITER_KVEC : 0;
     152#else
    150153                return (uintptr_t)paIov->iov_base >= USER_DS.seg ? ITER_KVEC : 0;
     154#endif
    151155            AssertMsgFailed(("%p LB %#zx\n", paIov->iov_base, paIov->iov_len));
    152156            break;
     
    14021406     * Check that this is valid user memory that is actually in the kernel range.
    14031407     */
    1404 #if RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1)
     1408#if RTLNX_VER_MIN(5,10,0)
     1409    if (   access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT)
     1410        && uPtrFrom >= TASK_SIZE_MAX)
     1411#elif RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1)
    14051412    if (   access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT)
    14061413        && uPtrFrom >= USER_DS.seg)
Note: See TracChangeset for help on using the changeset viewer.

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