xserver-multidpi/hw/xfree86/common
Rami Ylimaki 5b9a52be7e os: Prevent core dump from being truncated.
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: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17 23:20:52 -08:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
compiler.h Add platform compatibility defines for Sun Studio compilers 2009-12-18 10:31:53 -08:00
extramodes Remove some default modes that really shouldn't be in the default set. 2008-06-24 10:40:36 -04:00
fourcc.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Makefile.am xf86 ddx: add vga arbiter support. 2009-08-28 11:39:42 +10:00
modeline2c.awk Remove some OS/2 leftovers. 2009-04-06 10:58:47 -04:00
scoasm.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
vesamodes Fix standard VESA modes. 2006-11-03 14:06:32 -08:00
vidmodeproc.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86.h xfree86: removal of some dead code due VGA arbiter's inclusion 2009-08-31 19:25:48 +03:00
xf86AutoConfig.c xfree86: Add qxl driver to the autoconfig logic 2010-02-12 14:48:11 -08:00
xf86Build.h.in Print the build time as well as the date if we can. 2007-06-04 02:03:44 -04:00
xf86Bus.c xfree86: vgaarb: rework wrapping function 2009-09-16 11:04:24 +10:00
xf86Bus.h xfree86: remove bus state change notification callback 2009-08-20 13:57:45 +03:00
xf86cmap.c Avoid segfaults in XF86VidMode GammaRamp functions if randr_crtc is NULL 2010-01-27 14:18:20 -08:00
xf86cmap.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86Config.c xfree86: Reorder InputClass option priorities 2010-02-15 15:27:42 +10:00
xf86Config.h xfree86: "Staticize" functions in xf86AutoConfig.c 2009-07-24 13:25:42 +03:00
xf86Configure.c xfree86: remove unused variable in configureDDMonitorSection. 2009-12-11 11:37:37 +10:00
xf86Cursor.c xfree86: remove a superfluous assignment. 2009-03-16 13:29:07 +10:00
xf86DGA.c Re-fix DGA removal. 2009-10-01 11:02:25 +10:00
xf86DPMS.c xf86 ddx: add vga arbiter support. 2009-08-28 11:39:42 +10:00
xf86Events.c Move OS-specific VT key handler code from common to os-support 2010-01-25 11:10:00 -08:00
xf86fbBus.c xserver: remove RAC/resource handling code. 2009-07-28 15:14:28 +10:00
xf86fbman.c xfree86: Remove superfluous ifdef DEBUG checks. 2009-05-16 12:20:57 +10:00
xf86fbman.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86Globals.c config: add libudev input-hotplug backend 2009-12-30 19:05:44 +00:00
xf86Helper.c Convert checks for PC98 support from platform #ifdefs to configure flag 2009-12-18 10:30:53 -08:00
xf86Init.c os: Prevent core dump from being truncated. 2010-02-17 23:20:52 -08:00
xf86InPriv.h xfree86: don't FatalError on "too many input devices". 2008-12-02 15:50:38 +10:00
xf86Mode.c modes: Remove the ClockRanges type 2010-01-05 13:30:22 -08:00
xf86Module.h config: Introduce InputAttributes in NewInputDeviceRequest 2009-12-22 23:24:13 -08:00
xf86noBus.c xserver: remove RAC/resource handling code. 2009-07-28 15:14:28 +10:00
xf86Opt.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86Option.c xfree86: Support non-Option boolean entries in configuration 2009-12-22 23:24:02 -08:00
xf86pciBus.c Free libpciaccess iterator in xf86PciProbe 2009-09-20 20:45:25 +10:00
xf86pciBus.h xfree86: remove more RAC junky 2009-08-05 22:52:35 +03:00
xf86PciInfo.h No more "-scanpci" given that we already have it in libpciaccess. 2008-02-25 17:08:07 -03:00
xf86PM.c xf86 ddx: add vga arbiter support. 2009-08-28 11:39:42 +10:00
xf86Priv.h xfree86: Allow config directory to be specified on command line 2009-12-22 23:20:52 -08:00
xf86Privstr.h Convert checks for PC98 support from platform #ifdefs to configure flag 2009-12-18 10:30:53 -08:00
xf86RandR.c randr: Accept gamma set requests from XF86VidMode clients too 2009-04-17 17:47:54 -04:00
xf86sbusBus.c xfree86: delete devices probe code (-probe and -probeonly options) 2009-07-28 18:20:22 +03:00
xf86sbusBus.h Correct wrong symbol reference on sparc. 2008-12-08 22:11:50 -02:00
xf86ShowOpts.c xfree86: remove unused vbe header file 2009-07-10 16:34:09 +03:00
xf86str.h modes: Remove the ClockRanges type 2010-01-05 13:30:22 -08:00
xf86VGAarbiter.c xfree86: vgaarb: remove useless debug 2010-01-28 22:45:01 -08:00
xf86VGAarbiter.h xfree86: vgaarb: rework wrapping function 2009-09-16 11:04:24 +10:00
xf86VGAarbiterPriv.h xf86 ddx: add vga arbiter support. 2009-08-28 11:39:42 +10:00
xf86VidMode.c xfree86: Remove superfluous ifdef DEBUG checks. 2009-05-16 12:20:57 +10:00
xf86Xinput.c xfree86: Reorder InputClass option priorities 2010-02-15 15:27:42 +10:00
xf86Xinput.h xfree86: Remove xf86GetMotionEvents from public API. 2009-08-27 14:24:50 +10:00
xf86xv.c xf86xv: Fix off-by-one in viewport clipping 2009-12-16 21:53:18 -08:00
xf86xv.h XFree86: Xv: Add ClipNotify helper 2009-01-05 11:25:57 +02:00
xf86xvmc.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86xvmc.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86xvpriv.h XFree86: Xv: Add ClipNotify helper 2009-01-05 11:25:57 +02:00
xisb.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xisb.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xorgHelper.c xfree86: ANSI cleanups 2009-01-11 08:54:11 +01:00
xorgVersion.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00