VirtualBox

Changeset 98096 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Jan 16, 2023 4:16:36 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155230
Message:

Additions: Linux: vboxsf: suppress false-positive warning caused by CONFIG_FORTIFY_SOURCE kernel config option, bugref:10209, ticketref:21410.

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
2 edited

Legend:

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

    r96407 r98096  
    688688
    689689            RT_ZERO(*pReq);
    690             memcpy(&pReq->StrPath, path, SHFLSTRING_HEADER_SIZE + path->u16Size);
     690            VBOX_LINUX_MEMCPY(&pReq->StrPath, path, SHFLSTRING_HEADER_SIZE + path->u16Size);
    691691            pReq->CreateParms.Handle = SHFL_HANDLE_NIL;
    692692            pReq->CreateParms.CreateFlags = SHFL_CF_LOOKUP | SHFL_CF_ACT_FAIL_IF_NEW;
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r96407 r98096  
    7777# define SFLOG_ENABLED          1
    7878# define SFLOGRELBOTH(aArgs)    do { RTLogBackdoorPrintf aArgs; printk aArgs; } while (0)
     79#endif
     80
     81
     82/* Simmilar workaround for CONFIG_FORTIFY_SOURCE kernel config option as we have for host drivers.
     83 * In Linux 5.18-rc1, memcpy became a wrapper which does fortify checks
     84 * before triggering __underlying_memcpy() call. We do not pass these checks in some places so
     85 * bypass them for now.  */
     86#if RTLNX_VER_MIN(5,18,0) && !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
     87# define VBOX_LINUX_MEMCPY __underlying_memcpy
     88#else
     89#define VBOX_LINUX_MEMCPY  memcpy
    7990#endif
    8091
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