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>
The only DDX currently using hotplugging is the xfree86 one and it looks
like it'll stay that way for a bit. Move the initialization to the DDX,
since Xephyr, Xnest, and friends don't need HAL or udev notifications.
Add CloseInput (counterpart to InitInput) to be able to clean up the config
initialization from the DDX as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
XORG_WITH_DOXYGEN provides additional functions like a configure
option which allow platform builders to control the usage of
the doxygen program.
This is a requirement from platforms that do not have such doc tool.
A platform with a back level doxygen may use --without-doxygen
to get the rest of the documentation built.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
In order to give NewInputDeviceRequest more information, a new
InputAttributes type is introduced. Currently, this collects the product
and vendor name, device path, and sets booleans for attributes such as
having keys and/or a pointer. Only the HAL backend fills in the
attributes, though.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Convert all calls of CreateNewResourceType to pass name argument
Breaks DIX ABI.
ABI versions bumped:
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Make sure to check return value before setting bitmask flags.
For most calls, just fails to init the extension. Since Xinput
already calls FatalError() on initialization failure, so does
failure to allocate Xinput's resource type.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Correctly allow for excess length of DMXGetScreenAttributes reply
over standard 32 byte reply in addition to the displayName string
when computing the length of reply
http://bugs.freedesktop.org/show_bug.cgi?id=24685
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Ok, dmx docs are driving me slightly nuts. We probably shouldn't
include the built versions in the tarball, but we do, so this is an
attempt to make that work by having both the 'all' and 'dist' targets
depends on the doxygen output.
Signed-off-by: Keith Packard <keithp@keithp.com>
Don't really know why this section was disabled, but without it,
certain pPicture resources do not get free'd until later in the
FreeClientResources() process after the screen has been free'd -
resulting in seg fault.
With this patch, all resources normally free'd using vanilla X are
now also being freed correctly by Xdmx.
https://bugs.freedesktop.org/show_bug.cgi?id=24576
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
These can be recreated by simply running 'doxygen doxygen.conf' in
hw/dmx/doc. Some of the files do not exist anymore, these have been removed.
Some other files have a different naming scheme.
Doxygen warnings about missing links fixed, two warnings remain:
/home/whot/xorg/xserver/hw/dmx/dmxwindow.c:142: Warning: explicit link
request to 'dmxConfigureRootWindow' could not be resolved
/home/whot/xorg/xserver/hw/dmx/dmxwindow.c:119: Warning: explicit link
request to 'dmxConfigureScreenWindow()' could not be resolved
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Drop the dmx-specific defines, there's no reason to have separate ones
considering they're about as hardcoded as the default rules anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
XWin uses ddxBeforeReset, which is called in DIX. Other DDXs need to
define these in order to avoid an undefined symbol error at link time
when building alongside XWin. Xnest and Xvfb already provide empty stubs;
this does the same for Xdmx and the platform-neutral KDrive servers.
Also add a prototype to avoid a warning in all DDXs.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This patch undefines MITSHM for dmx - we don't support the required
screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to
miinitext.c, where they belong.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This fixes input in dmx, the pointer appears at the right positions to the
clients now.
Also mark the spot where we pass in the button state as valuator to GPE
with a FIXME. (??)
Tested-by: Kevin Martin
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fixes build with newer dmx header files that have been split between dmx.h
and dmxext.h. _DMX_SERVER_ is no longer needed with the split headers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Approach taken is inefficient, it converts the xkb symbol table to a core
symbol table first and then extracts the keycode from there.
Consider this a todo for a rainy afternoon when the beer fridge demands
emptying.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Currently only None labels are passed in, in the future these labels should
be whatever the respective buttions/axes are.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
All other functions are pushed into where they seemed to fit.
main.c is now linked separately into libmain.a and linked in by the various
DDXs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Changes MakeAtom to take a const char * and NameForAtom to return them,
since many callers pass pointers to constant strings stored in read-only
ELF sections. Updates in-tree callers as necessary to clear const
mismatch warnings introduced by this change.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
We already have modmap (in the exact same format!) in XKB, so just use
that all the time, instead of duplicating the information.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We already have state fully stored within XKB, so instead of duplicating it,
just generate the values to send to clients when required.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There were a few spots left in the source that were using the
--with-mesa-source defined headers or the now removed $(top_srcdir)/GL
directory. These aren't needed anymore as all the necessary source for
GLX is in $(top_srcdir)/glx.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Using GL for the PKG_CHECK_MODULES identifier multiple times means only
the first call will actually be used. Later calls will be skipped due to
GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a
different identifier and DMX to just reusing GL_CFLAGS.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
A grep on xorg/* revealed there's no consumer of this define.
Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.
Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
According to the press release:
Previous SGI contributions to the free and open source community
are now available under the new license. These contributions
include the SGI® OpenGL® Sample Implementation, the GLX™ API and
other GLX extensions.
[...]
"SGI has been one of the most ardent commercial supporters of free
and open source software, so it was important to us that we continue
to support the free software development community by releasing our
earlier OpenGL-related contributions under this new license," said
Steve Neuner, director of Linux, SGI. "This license ensures that all
existing user communities will benefit, and their work can proceed
unimpeded. Both Mesa and the X.org Project can continue to utilize
this code in free software distributions of GNU/Linux. Now more than
ever, software previously released by SGI under earlier GLX and SGI
Free Software License B is free."
"The GLX API" is here read to include the original GLX source release
from:
http://www.sgi.com/products/software/opensource/glx/download.html
ftp://ftp.sgi.com/sgi/opengl/glx/glx1_2.1.tgz
which includes glxext.c as included in XFree86, from which our copies
in glx/ and hw/dmx/glxProxy/ are derived.
Under the terms of version 1.1, "once Covered Code has been published
under a particular version of the License, Recipient may, for the
duration of the License, continue to use it under the terms of that
version, or choose to use such Covered Code under the terms of any
subsequent version published by SGI."
FreeB 2.0 license refers to "dates of first publication". They are here
taken to be 1991-2000, as noted in the original license text:
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
Official FreeB 2.0 text:
http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf
As always, this code has not been tested for conformance with the OpenGL
specification. OpenGL conformance testing is available from
http://khronos.org/ and is required for use of the OpenGL logo in
product advertising and promotion.
This extension provided bug-compatibility with pre-X11R6, but has been
stubbed out in our server since 2006 to return BadRequest when you actually
asked for it.
Formerly the code claimed it could only handle up to 256 visuals, which
was true. Also true, but not explicitly stated, was that it could only
handle visuals with VID < 256. If you have enough screens, and subsystems
that add lots of visuals, you can easily run off the end. (Made worse
because we allocate visual IDs from the same pool as XIDs.) If your app
then chooses a visual > 256, then the Xinerama code would throw BadMatch
on CreateColormap and your app wouldn't start.
With this change, PanoramiXVisualTable is gone. Other subsystems that
were using it as a translation table between each screen's visuals now
use a PanoramiXTranslateVisual() helper.
We need to start breaking the XKB API to enforce sanity, so drag whichever
headers we need to do so into the server tree, as the client API is set in
stone, being part of Xlib.
RISC chips that trap on unaligned loads and stores need to
define __GLX_ALIGN64. This used to get added to the cflags
in the old *.cf files but it no longer does in the modular
X server.
Also, Alpha needs to pass -mieee to the compiler as well.
This is a simple backport of a patch that debian, and probably other
distributions, have been applying forever. To the best of my
knowledge the patch was written by Jurij Smakov. See Debian bug
number #388125.
I just checked and this has been rotting for more than a year in
freedesktop bugzilla as #8392.
Signed-off-by: David S. Miller <davem@davemloft.net>
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive. This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it. No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
This cleans up server Makefile.ams a little bit, but also means that people
messing with configure.ac need to be careful with whether they put libraries
in the _LIBS or _SYS_LIBS targets. Hopefully the comment in configure.ac will
clarify the issues.
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
Now, fbcmap_mi.c contains the fb functions which just wrap mi functions.
Previously, these were in fbcmap.c and compiled when XFree86Server was defined.
Now, clients of fbcmap should either use fbcmap.c or fbcmap_mi.c and not worry
about setting the XFree86Server symbol.
It seems that the changes to X input exposed a problem that wasn't detected
before. The axis clipping code in GetPointerEvents() uses those limits to
constrain the pointer's coordinate range. The max was zero so the pointer
couldn't move.
Use new dmxCoreMotion2() function which enqueues motion events with
GetPointerEvents()/mieqEnqueue().
The clipAxis() code in GetPointerEvents() is causing some grief. The
limits seem to have always been (0,0) according to the original calls
to InitValuatorAxisStruct() in dmxinputinit.c.
Terrible hack for now: Call InitValuatorAxisStruct() with hard-coded max
values of 1280 (my screen width).
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
include/xkbsrv.h, and the world updated to look for it in the new place,
since it made no sense to define server API in an extension header. Any
further work along this line will need to do similar things with XKBgeom.h
and friends.
Get rid of almost all uses of these definitions. They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build. As well as
for miinitext.c. But largely gone.