VirtualBox

Changeset 91796 in vbox for trunk


Ignore:
Timestamp:
Oct 17, 2021 10:29:58 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. [kmod build fix] bugref:10124

File:
1 edited

Legend:

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

    r91795 r91796  
    22212221SUPR0DECL(int)  SUPR0PrintfV(const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(1, 0);
    22222222
    2223 /* Suppress -Winline warnings as (older) gcc refuses to inline functions using va_start:  */
    2224 #if RT_GNUC_PREREQ(4, 2)
    2225 # if RT_GNUC_PREREQ(4, 6)
    2226 #  pragma GCC diagnostic push
    2227 # endif
    2228 # pragma GCC diagnostic ignored "-Winline"
     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__
    22292234#endif
     2235
    22302236/**
    22312237 * Writes to the debugger and/or kernel log.
     
    22472253    return 0;
    22482254}
    2249 #if RT_GNUC_PREREQ(4, 6)
    2250 # pragma GCC diagnostic pop
     2255
     2256/* HACK ALERT! See above. */
     2257#ifdef SUPR0PRINTF_UNDO_INLINE_HACK
     2258# define __inline__ inline
    22512259#endif
    22522260
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