VirtualBox

Ignore:
Timestamp:
Oct 5, 2023 3:26:17 PM (18 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159362
Message:

Additions: Linux: Replace VBSF_UNFORTIFIED_MEMCPY with RT_BCOPY_UNFORTIFIED, bugref:10209.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r99433 r101359  
    7777# define SFLOG_ENABLED          1
    7878# define SFLOGRELBOTH(aArgs)    do { RTLogBackdoorPrintf aArgs; printk aArgs; } while (0)
    79 #endif
    80 
    81 
    82 /** Similar workaround for CONFIG_FORTIFY_SOURCE kernel config option as we
    83  * have in the host drivers.
    84  *
    85  * In Linux 5.18-rc1, memcpy became a wrapper which does fortify checks before
    86  * making a call to __underlying_memcpy().  There are a number of places where
    87  * we trigger the "field-spanning write" fortify check, typically when copying
    88  * to SHFLSTRING structure members as these are actually of variable length but
    89  * we don't (cannot with gcc) use RT_FLEXIBLE_ARRAY_NESTED.
    90  *
    91  * Use this when copying to structures or members with a variable length member.
    92  *
    93  * @see @ticketref{21410}, @bugref{10209}
    94  */
    95 #if RTLNX_VER_MIN(5,18,0) && !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
    96 # define VBSF_UNFORTIFIED_MEMCPY __underlying_memcpy
    97 #else
    98 # define VBSF_UNFORTIFIED_MEMCPY memcpy
    9979#endif
    10080
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