VirtualBox

Changeset 103168 in vbox for trunk


Ignore:
Timestamp:
Feb 1, 2024 5:24:16 PM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161425
Message:

iprt: r0drv: Linux: Prevent mk_pte warning introduced in kernel 6.6, bugref:10524.

Update RTMEM_PROT_* to Linux PAGE_* mapping and use existing macro
to define protection mask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r103066 r103168  
    245245            if (fKernel)
    246246            {
     247# if RTLNX_VER_MIN(6,6,0)
     248                /* In kernel 6.6 mk_pte() macro was fortified with additional
     249                 * check which does not allow to use our custom mask anymore
     250                 * (see kernel commit ae1f05a617dcbc0a732fbeba0893786cd009536c).
     251                 * For this particular mapping case, an existing mask PAGE_KERNEL_ROX
     252                 * can be used instead. PAGE_KERNEL_ROX was introduced in
     253                 * kernel 5.8, however, lets apply it for kernels 6.6 and newer
     254                 * to be on a safe side.
     255                 */
     256                return PAGE_KERNEL_ROX;
     257# else
    247258                pgprot_t fPg = MY_PAGE_KERNEL_EXEC;
    248259                pgprot_val(fPg) &= ~_PAGE_RW;
    249260                return fPg;
     261# endif
    250262            }
    251263            return PAGE_READONLY_EXEC;
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