1. 21 Jun, 2012 1 commit
  2. 03 May, 2012 3 commits
    • Daniel Kurtz's avatar
      os/log: refactor logging · c91d00e0
      Daniel Kurtz authored
      
      
      It is not safe to ever use an arbitrary (possibly user supplied) string as
      part of the format for a *sprintf() call.
      
      For example:
        1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n"
        2. Pair it with a computer running X and try to use it
        3. X is not happy when trying to do the following in xf86-input-evdev:
           xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device);
           because LogVHdrMessageVerb() has put the %n from the device name
           into a format string of the form:
              "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n"
      
      Instead, build up a log message in place by appending successive formatted
      strings by sncprintf'ing to the end of the previous.
      Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      c91d00e0
    • Daniel Kurtz's avatar
      os/log: only write timestamp if a message is actually written to logfile · 6ce0eac4
      Daniel Kurtz authored
      
      
      The current code will write a timestamps into the logFile whenever
      the last message ended with a '\n' - even if the verb for that timestamp
      is at too high a level.  This timestamp will sit there with no matching
      message until the next call to LogVWrite with a valid verb.
      
      In other words, in some cases, timestamps in the X.org.log are for some
      completely unrelated message that was previously ignored due to
      insufficient verbosity, and not for the message that appears next to it
      in the log file.
      
      We keep the current policy which appears to be to only apply timestamps if
      a message is actually written to a log file.  That is, no timestamps on
      stderr, or in the mem buffer.  Therefore, the timestamp stringification
      is moved to the conditional where it is used.
      
      Since logging uses a fixed length buffer, this patch also forces a '\n'
      whenever a buffer is terminated due to a too-long write request.  This
      allows the newline detection to work even on overflow, and also cleans up
      the log a bit in the overflow case.
      Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      6ce0eac4
    • Daniel Kurtz's avatar
      os/log: trivial cleanups · c3086287
      Daniel Kurtz authored
      
      
       * space->tab
       * remove comment that doesn't make any sense
      Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      c3086287
  3. 30 Mar, 2012 1 commit
  4. 24 Mar, 2012 1 commit
  5. 22 Mar, 2012 1 commit
  6. 21 Mar, 2012 1 commit
    • Keith Packard's avatar
      Introduce a consistent coding style · 9838b703
      Keith Packard authored
      This is strictly the application of the script 'x-indent-all.sh'
      from util/modular. Compared to the patch that Daniel posted in
      January, I've added a few indent flags:
      
      	-bap
      	-psl
      	-T PrivatePtr
      	-T pmWait
      	-T _XFUNCPROTOBEGIN
      	-T _XFUNCPROTOEND
      	-T _X_EXPORT
      
      The typedefs were needed to make the output of sdksyms.sh match the
      previous output, otherwise, the code is formatted badly enough that
      sdksyms.sh generates incorrect output.
      
      The generated code was compared with the previous version and found to
      be essentially identical -- "assert" line numbers and BUILD_TIME were
      the only differences found.
      
      The comparison was done with this script:
      
      dir1=$1
      dir2=$2
      
      for dir in $dir1 $dir2; do
      	(cd $dir && find . -name '*.o' | while read file; do
      		dir=`dirname $file`
      		base=`basename $file .o`
      		dump=$dir/$base.dump
      		objdump -d $file > $dump
      	done)
      done
      
      find $dir1 -name '*.dump' | while read dump; do
      	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
      	diff -u $dump $otherdump
      do...
      9838b703
  7. 23 Nov, 2011 1 commit
  8. 12 Oct, 2011 1 commit
  9. 22 Aug, 2011 2 commits
  10. 26 Jul, 2011 1 commit
  11. 05 May, 2011 1 commit
  12. 25 Apr, 2011 1 commit
    • Jeremy Huddleston Sequoia's avatar
      os: Silence warnings when building with clang · c524f8bb
      Jeremy Huddleston Sequoia authored
      
      
      access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses]
              if ((host->family == FamilyServerInterpreted)) {
                   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      access.c:1492:20: note: use '=' to turn this equality comparison into an assignment
              if ((host->family == FamilyServerInterpreted)) {
                                ^~
                                =
      access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning
              if ((host->family == FamilyServerInterpreted)) {
                  ~             ^                         ~
      
      In file included from xstrans.c:8:
      In file included from /usr/X11/include/X11/Xtrans/transport.c:62:
      /usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99
            [-Werror,-Wimplicit-function-declaration]
          PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
          ^
      
      log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
              if (asprintf(&logFileName, fname, display) == -1)
                                         ^~~~~
      log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
                      if ((asprintf(&suffix, backup, display) == -1) ||
                                             ^~~~~~
      log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
              LogVWrite(verb, tmpBuf, args);
                              ^~~~~~
      Signed-off-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <jeremyhu@apple.com>
      Reviewed-by: Jamey Sharp's avatarJamey Sharp <jamey@minilop.net>
      c524f8bb
  13. 07 Dec, 2010 1 commit
  14. 04 Dec, 2010 1 commit
  15. 01 Dec, 2010 1 commit
  16. 10 Nov, 2010 1 commit
  17. 24 Oct, 2010 3 commits
  18. 16 May, 2010 1 commit
  19. 13 May, 2010 1 commit
  20. 12 May, 2010 2 commits
  21. 01 Apr, 2010 1 commit
  22. 29 Mar, 2010 1 commit
  23. 22 Mar, 2010 1 commit
    • Yaakov Selkowitz's avatar
      New header for XF86Bigfont server functions · abf4e0b7
      Yaakov Selkowitz authored
      
      
      Xext/xf86bigfont.c contains three non-static functions which are called
      elsewhere in the server.  This creates a new header containing these
      declarations in order to fix several warnings:
      
      xf86bigfont.c:285: warning: no previous prototype for `XF86BigfontFreeFontShm'
      dixfonts.c:502: warning: implicit declaration of function `XF86BigfontFreeFontS$
      dixfonts.c:502: warning: nested extern declaration of `XF86BigfontFreeFontShm'
      log.c:436: warning: implicit declaration of function `XF86BigfontCleanup'
      log.c:436: warning: nested extern declaration of `XF86BigfontCleanup'
      Signed-off-by: Yaakov Selkowitz's avatarYaakov Selkowitz <yselkowitz@users.sourceforge.net>
      Reviewed-by: Julien Cristau's avatarJulien Cristau <jcristau@debian.org>
      abf4e0b7
  24. 18 Feb, 2010 1 commit
    • Rami Ylimaki's avatar
      os: Prevent core dump from being truncated. · 5b9a52be
      Rami Ylimaki authored
      
      
      The problem fixed by this patch can be reproduced on Linux with the
      following steps.
      - Access NULL pointer intentionally in ProcessOtherEvent on key press.
      - Instead of saving core dump to a file, write it into a pipe.
        echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern
      - Dump the core by pressing a key.
      
      While the core is being dumped into the pipe, the smart schedule timer
      will cause a pending SIGALRM. Linux kernel stops writing data to the
      pipe when there are pending signals. This causes the core dump to be
      truncated. On my system I'm expecting a 6 MB dump but the size will be
      60 kB instead. The problem is solved if we block the SIGALRM caused by
      expired smart schedule timer.
      
      I haven't been able to reproduce this problem in the following cases.
      - Save core dump to a file instead of a pipe.
      - kill -SEGV `pidof Xorg`
      - Press a key to dump core while gdb is attached to Xorg.
      - Give option -dumbSched to Xorg.
      
      Also note that the fix works only when NoTrapSignals has the default
      value FALSE. The problem can still be reproduced if error signals
      aren't trapped. In addition to pending SIGALRM, there is a similar
      problem with pending SIGIO from the keyboard driver during core dump.
      Signed-off-by: default avatarRami Ylimaki <ext-rami.ylimaki@nokia.com>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      5b9a52be
  25. 27 Jan, 2010 1 commit
  26. 25 Jan, 2010 1 commit
  27. 17 Dec, 2009 1 commit
  28. 19 Apr, 2009 1 commit
  29. 10 Apr, 2009 1 commit
  30. 16 Dec, 2008 1 commit
  31. 03 Dec, 2008 1 commit
    • Paulo Cesar Pereira de Andrade's avatar
      Rework symbol visibility for easier maintenance · 49f77fff
      Paulo Cesar Pereira de Andrade authored
        Save in a few special cases, _X_EXPORT should not be used in C source
      files. Instead, it should be used in headers, and the proper C source
      include that header. Some special cases are symbols that need to be
      shared between modules, but not expected to be used by external drivers,
      and symbols that are accessible via LoaderSymbol/dlopen.
      
        This patch also adds conditionally some new sdk header files, depending
      on extensions enabled. These files were added to match pattern for
      other extensions/modules, that is, have the headers "deciding" symbol
      visibility in the sdk. These headers are:
      o Xext/panoramiXsrv.h, Xext/panoramiX.h
      o fbpict.h (unconditionally)
      o vidmodeproc.h
      o mioverlay.h (unconditionally, used only by xaa)
      o xfixes.h (unconditionally, symbols required by dri2)
      
        LoaderSymbol and similar functions now don't have different prototypes,
      in loaderProcs.h and xf86Module.h, so that both headers can be included,
      without the need of defining IN_LOADER.
      ...
      49f77fff
  32. 30 Nov, 2008 1 commit
    • Paulo Cesar Pereira de Andrade's avatar
      Export symbols defined in the sdk. · d6cbd451
      Paulo Cesar Pereira de Andrade authored
        This is the biggest "visibility" patch. Instead of doing a "export"
      symbol on demand, export everything in the sdk, so that if some module
      fails due to an unresolved symbol, it is because it is using a symbol
      not in the sdk.
      
        Most exported symbols shouldn't really be made visible, neither
      advertised in the sdk, as they are only used by a single shared object.
      
        Symbols in the sdk (or referenced in sdk macros), but not defined
      anywhere include:
      XkbBuildCoreState()
      XkbInitialMap
      XkbXIUnsupported
      XkbCheckActionVMods()
      XkbSendCompatNotify()
      XkbDDXFakePointerButton()
      XkbDDXApplyConfig()
      _XkbStrCaseCmp()
      _XkbErrMessages[]
      _XkbErrCode
      _XkbErrLocation
      _XkbErrData
      XkbAccessXDetailText()
      XkbNKNDetailMaskText()
      XkbLookupGroupAndLevel()
      XkbInitAtoms()
      XkbGetOrderedDrawables()
      XkbFreeOrderedDrawables()
      XkbConvertXkbComponents()
      XkbWriteXKBSemantics()
      XkbWriteXKBLayout()
      XkbWriteXKBKeymap()
      XkbWriteXKBFile()
      XkbWriteCFile()
      XkbWriteXKMFile()
      XkbWriteToServer()
      XkbMergeFile()
      XkmFindTOCEntry()
      XkmReadFileSection()
      XkmReadFileSectionName()
      InitExtInput()
      xf86CheckButton()
      xf86SwitchCoreDevice()
      RamDacSetGamma()
      RamDacRestoreDACValues()
      xf86Bpp
      xf86ConfigPix24
      xf86MouseCflags[]
      xf86SupportedMouseTypes[]
      xf86NumMouseTypes
      xf86ChangeBusIndex()
      xf86EntityEnter()
      xf86EntityLeave()
      xf86WrapperInit()
      xf86RingBell()
      xf86findOptionBoolean()
      xf86debugListOptions()
      LoadSubModuleLocal()
      LoaderSymbolLocal()
      getInt10Rec()
      xf86CurrentScreen
      xf86ReallocatePciResources()
      xf86NewSerialNumber()
      xf86RandRSetInitialMode()
      fbCompositeSolidMask_nx1xn
      fbCompositeSolidMask_nx8888x0565C
      fbCompositeSolidMask_nx8888x8888C
      fbCompositeSolidMask_nx8x0565
      fbCompositeSolidMask_nx8x0888
      fbCompositeSolidMask_nx8x8888
      fbCompositeSrc_0565x0565
      fbCompositeSrc_8888x0565
      fbCompositeSrc_8888x0888
      fbCompositeSrc_8888x8888
      fbCompositeSrcAdd_1000x1000
      fbCompositeSrcAdd_8000x8000
      fbCompositeSrcAdd_8888x8888
      fbGeneration
      fbIn
      fbOver
      fbOver24
      fbOverlayGeneration
      fbRasterizeEdges
      fbRestoreAreas
      fbSaveAreas
      composeFunctions
      VBEBuildVbeModeList()
      VBECalcVbeModeIndex()
      TIramdac3030CalculateMNPForClock()
      shadowBufPtr
      shadowFindBuf()
      miRRGetScreenInfo()
      RRSetScreenConfig()
      RRModePruneUnused()
      PixmanImageFromPicture()
      extern int miPointerGetMotionEvents()
      miClipPicture()
      miRasterizeTriangle()
      fbPush1toN()
      fbInitializeBackingStore()
      ddxBeforeReset()
      SetupSprite()
      InitSprite()
      DGADeliverEvent()
      
        SPECIAL CASES
      o defined as _X_INTERNAL
      	xf86NewInputDevice()
      o defined as static
      	fbGCPrivateKey
      	fbOverlayScreenPrivateKey
      	fbScreenPrivateKey
      	fbWinPrivateKey
      o defined in libXfont.so, but declared in xorg/dixfont.h
      	GetGlyphs()
      	QueryGlyphExtents()
      	QueryTextExtents()
      	ParseGlyphCachingMode()
      	InitGlyphCaching()
      	SetGlyphCachingMode()
      d6cbd451
  33. 21 Oct, 2008 1 commit
  34. 17 Jul, 2008 1 commit