Keith Packard
41da295eb5
Trap SIGBUS to handle truncated shared memory segments
...
If a client passes a section of memory via file descriptor and then
subsequently truncates that file, the underlying pages will be freed
and the addresses invalidated. Subsequent accesses to the page will
fail with a SIGBUS error.
Trap that SIGBUS, figure out which segment was causing the error and
then allocate new pages to fill in for that region. Mark the offending
shared segment as invalid and free the resource ID so that the client
will be able to tell when subsequently attempting to use the segment.
Signed-off-by: Keith Packard <keithp@keithp.com>
v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis)
v3: Also catch errors in ShmCreateSegment
Conflicts:
include/dix-config.h.in
include/xorg-config.h.in
2013-11-11 15:16:07 -08:00
..
.gitignore
.gitignore: use common defaults with custom section #24239
2009-11-11 21:40:20 -08:00
busfault.h
Trap SIGBUS to handle truncated shared memory segments
2013-11-11 15:16:07 -08:00
callback.h
dix: delete all callbacks before reset
2013-05-08 09:27:30 +10:00
client.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
closestr.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
closure.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
colormap.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
colormapst.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
cursor.h
Abstract cursor refcounting
2013-05-15 19:17:57 +10:00
cursorstr.h
dix: FIXES is not optional
2013-09-10 13:28:24 -04:00
dix-config-apple-verbatim.h
Move the apple fat binary hacks back to a header file, and make it apple-only.
2009-01-30 16:36:45 -08:00
dix-config.h.in
Trap SIGBUS to handle truncated shared memory segments
2013-11-11 15:16:07 -08:00
dix.h
sync: if the idle time was reset, force alarms to trigger ( #70476 )
2013-10-18 16:44:32 +10:00
dixaccess.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
dixevents.h
dix: Remove redundant declarations.
2012-05-14 13:31:00 +01:00
dixfont.h
dix: fix redundant redeclaration warnings in dixfont
2012-11-05 13:24:59 -06:00
dixfontstr.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
dixfontstubs.h
dix: fix redundant redeclaration warnings in dixfont
2012-11-05 13:24:59 -06:00
dixgrabs.h
dix: AllocGrab can copy if an argument is passed in
2013-05-10 14:32:37 +10:00
dixstruct.h
Add interfaces to get FDs from clients over the socket
2013-10-31 16:58:25 -07:00
eventconvert.h
input: drop FP1616 macro
2012-11-19 12:12:23 +10:00
events.h
Add support for XI2.3: Pointer barrier events and releases.
2012-12-17 15:01:45 +10:00
eventstr.h
Xi: use public.processInputProc to replay the touch history
2013-05-10 14:32:36 +10:00
exevents.h
dix: Move DeviceFocusEvent from Xi into enterleave.c
2012-05-17 08:50:44 +10:00
extension.h
Constify argument to LoadExtension
2012-11-21 11:13:55 +11:00
extinit.h
present: Add Present extension
2013-10-31 16:59:18 -07:00
extnsionst.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
gc.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
gcstruct.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
globals.h
Move extension initialisation prototypes into extinit.h
2012-07-09 23:06:41 -07:00
glx_extinit.h
glx: drop GLX_LIBS from X server and workaround sdksyms.
2012-07-25 23:30:53 -07:00
hotplug.h
xf86: don't hotplug output devices while VT switched.
2013-04-12 10:01:23 +10:00
input.h
include: change grabtypes to start at 1
2013-10-14 11:07:37 +10:00
inputstr.h
include: wrap EMASKSIZE in parentheses
2013-08-30 14:26:55 +10:00
inpututils.h
dix: split xi2_mask_isset into a per-device function
2012-12-12 17:25:16 +10:00
kdrive-config.h.in
kdrive: Add option to compile out input drivers
2010-01-06 19:47:53 +06:00
list.h
list: Avoid using X types
2013-09-10 13:28:24 -04:00
Makefile.am
Trap SIGBUS to handle truncated shared memory segments
2013-11-11 15:16:07 -08:00
misc.h
Add swapll to byte swap 64-bit datatypes
2013-10-31 16:58:18 -07:00
miscstruct.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
opaque.h
os: Add -displayfd option
2012-05-01 11:36:30 +10:00
optionstr.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
os.h
Add support for MIT-SHM AttachFd request
2013-10-31 16:58:28 -07:00
pixmap.h
dix/pixmap: track dirty pixmaps in server. (v4)
2012-07-07 10:37:11 +01:00
pixmapstr.h
dix/pixmap: track dirty pixmaps in server. (v4)
2012-07-07 10:37:11 +01:00
privates.h
dbe: Fold the window private private into the window private
2013-09-10 13:28:24 -04:00
property.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
propertyst.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
protocol-versions.h
Xext: Enable MIT-SHM FD-passing request definitions only when possible
2013-11-11 15:12:50 -08:00
ptrveloc.h
dix: indentation fixes for pointer acceleration
2012-05-16 10:59:35 +10:00
region.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
regionstr.h
Add a RegionDuplicate function
2013-10-31 16:58:16 -07:00
registry.h
dix: add missing dixFreeRegistry define
2013-06-06 08:12:38 +10:00
resource.h
xserver: Remove duplicate declaration in resource.h
2012-05-14 13:17:08 +01:00
rgb.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
screenint.h
dix: don't use "new" as a parameter name
2012-07-25 09:27:11 -07:00
scrnintstr.h
dix/randr: add a hook into screen to replace scanout pixmap
2012-07-07 10:39:09 +01:00
selection.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
servermd.h
ARM64: Add support for aarch64
2013-11-06 16:41:49 -08:00
site.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
swaprep.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
swapreq.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
validate.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
version-config.h.in
Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave.
2009-04-14 10:35:44 -04:00
window.h
dix: Remove MapUnmapEventsEnabled and friends
2012-09-23 10:41:54 -07:00
windowstr.h
dix: Fix types in WindowOptRec
2012-09-20 14:40:18 -04:00
XIstubs.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
xkb-config.h.in
Move to autoconf standard function name checks & defines
2011-12-05 14:32:45 -08:00
xkbfile.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
xkbrules.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
xkbsrv.h
xkb: free XkbRulesUsed and XkbRulesDflt on extension cleanup
2013-05-07 09:40:51 +10:00
xkbstr.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
xorg-config.h.in
Remove dix-config.h config variables from xorg-config.h
2013-11-11 15:11:52 -08:00
xorg-server.h.in
Make XTrans FD passing support optional. Define only on Linux
2013-11-11 15:11:39 -08:00
Xprintf.h
os/xprintf: add Xvscnprintf and Xscnprintf
2012-05-03 14:59:23 +10:00
xserver-properties.h
Add missing labels for multitouch valuators
2012-10-30 15:11:10 +10:00
xsha1.h
Move SHA1 computation from render/glyph.c to os/
2009-10-15 01:17:44 +02:00
xwin-config.h.in
include: Add RELOCATE_PROJECTROOT to xwin-config.h header
2013-01-16 16:48:34 +00:00