VirtualBox

Changeset 91798 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 17, 2021 10:56:45 PM (3 years ago)
Author:
vboxsync
Message:

SUPDrv,IPRT,VBoxGuest: Don't export ellipsis functions from SUPDrv, as that makes switching back to the kernel stack unsafe. Exports has changes (added+removed), but not bumping major IOC version as that was done a few hours ago already and it's Sunday. [another kmod build fix attempt] bugref:10124

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r91796 r91798  
    22212221SUPR0DECL(int)  SUPR0PrintfV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    22222222
    2223 /* HACK ALERT! linux/compiler_types.h redefines __inline__ to always_inline which causes the compiler (gcc 9.3 and
    2224                older at least) to barf on the va_list below when SUPR0Printf is used, preventing compiliation of
    2225                SUPDrv.c among other things.  We have a hack for this in iprt/types.h for pre 4.1 compilers where
    2226                it would barf even if not used, causing troubles on 2-3 functions in iprt/string.h.  Applying that
    2227                fix for all gcc versions there would be preferable, however, since a while we include iprt/types.h
    2228                at the start of the-linux-kernel.h, making that kind of suspect as it may cause breakage...
    2229                So, chickening out and just working around it here for now. */
    2230 #if defined(__inline__) && defined(RT_OS_LINUX) && defined(__KERNEL__) && defined(__LINUX_COMPILER_TYPES_H)
    2231 /** @todo In the long run, sort this out in a more proper way! */
    2232 # define SUPR0PRINTF_UNDO_INLINE_HACK 1
    2233 # undef __inline__
    2234 #endif
    2235 
    22362223/**
    22372224 * Writes to the debugger and/or kernel log.
     
    22442231 * @param   ...             Arguments referenced by the format string.
    22452232 */
    2246 DECLINLINE(int) SUPR0Printf(const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2); /* RT_IPRT_FORMAT_ATTR only allowed on proto */
    2247 DECLINLINE(int) SUPR0Printf(const char *pszFormat, ...)
     2233#if defined(__GNUC__)
     2234/* Define it as static for GCC as it cannot inline functions using va_start() anyway,
     2235   and linux redefines __inline__ to always inlining forcing gcc to issue an error. */
     2236static int __attribute__((__unused__))
     2237#else
     2238DECLINLINE(int)
     2239#endif
     2240RT_IPRT_FORMAT_ATTR(1, 2) SUPR0Printf(const char *pszFormat, ...)
    22482241{
    22492242    va_list va;
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