summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2015-03-31randr: Add Monitor support (v1.1)Keith Packard1-1/+1
Store the user-defined monitors in the RandR screen private. Generate a list of monitors from both the user-defined ones and from any outputs not mentioned in one of the user-defined monitors. This list covers both the outputs in the main screen as well as any slaves. v1.1: airlied: fix up primary skipping bug, fix wrong height initialiser add get_active flag from updated protocol. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-03-16Make PseudoramiXExtensionInit() prototype more generally availableJon TURNEY3-5/+36
Make PseudoramiXExtensionInit() prototype available to hw/xwin Rather than avoiding a reference to it being pulled in to Xorg by sdksyms by hiding this prototype behind the INXQUARTZ define, which is only defined when building Xquartz, introduce nonsdk_extinit.h and move it there. (The only remaining use of INXQUARTZ is in mi/miiniext.c, in order to do PseudoramiXExtensionInit() at the point apparently needed by Xquartz) Also remove duplicate declaration of noPseudoramiXExtension from pseudoramiX.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-03-13Expose GetMaster to modules.Michal Srb1-1/+1
Add _X_EXPORT to GetMaster function. It is required by tigervnc's VNC module. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13Drop valuator mask argument from GetKeyboardEventsPeter Hutterer1-3/+2
Nothing was using it and if anyone had they would've gotten a warning and noticed that it doesn't actually work. Drop this, it has been unused for years. Input ABI 22 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2015-02-10Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe callsAlan Coopersmith2-0/+42
Use typedefs to work around dtrace dropping const qualifiers from probe arguments when generating Xserver-dtrace.h. Add new probes.h header to avoid having to replicate these typedefs in every file with dtrace probes. Gets rid of these warnings from gcc 4.8: getevents.c:1096:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' discards 'const' qualifier from pointer target type [enabled by default] getevents.c:1096:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-23dix: make RegionInit legal C++Adam Jackson1-1/+1
The CVE fix in: commit 97015a07b9e15d8ec5608b95d95ec0eb51202acb Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Wed Jan 22 22:37:15 2014 -0800 dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4] offended the C++ demons: ../../include/regionstr.h:147:45: error: invalid conversion from 'void*' to 'pixman_region16_data_t* {aka pixman_region16_data*}' [-fpermissive] Normally this isn't a problem, because around here we have the sense and common decency to not use C++, but this does make tigervnc fail to build, which is a little rude of us. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-12-09Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5]Keith Packard1-1/+1
The 'n' parameter must be surrounded by parens in both places to prevent precedence from mis-computing things. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-12-08Xi: unvalidated lengths in Xinput extension [CVE-2014-8095]Alan Coopersmith1-0/+4
Multiple functions in the Xinput extension handling of requests from clients failed to check that the length of the request sent by the client was large enough to perform all the required operations and thus could read or write to memory outside the bounds of the request buffer. This commit includes the creation of a new REQUEST_AT_LEAST_EXTRA_SIZE macro in include/dix.h for the common case of needing to ensure a request is large enough to include both the request itself and a minimum amount of extra data following the request header. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08dix: integer overflow in REQUEST_FIXED_SIZE() [CVE-2014-8092 4/4]Alan Coopersmith1-1/+2
Force use of 64-bit integers when evaluating data provided by clients in 32-bit fields which can overflow when added or multiplied during checks. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4]Alan Coopersmith1-3/+7
RegionSizeof contains several integer overflows if a large length value is passed in. Once we fix it to return 0 on overflow, we also have to fix the callers to handle this error condition v2: Fixed limit calculation in RegionSizeof as pointed out by jcristau. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-11-12Drop trailing whitespacesPeter Hutterer33-163/+163
sed -i "s/[ ]\+$//g" **/*.(c|h) happy reviewing... git diff -w is an empty diff. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12xfree86: drop double-typedef of DBusConnectionPeter Hutterer1-1/+1
Just include dbus.h, it's been typedef'd there since 2003. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12include: change RegionSize() to take a size_tPeter Hutterer1-1/+1
/usr/include/xorg/regionstr.h:130:36: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec))); ^ ~ Really only just pushes the problem to the caller, but maybe that motivates someone to fix it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12include: fix documentation for list.hPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-30include: fix compiler warning about casting int to uint16_tPeter Hutterer1-1/+1
/usr/include/xorg/misc.h:141:30: warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion] return ((x & 0xff) << 8) | ((x >> 8) & 0xff); ~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ Function sig is a uint16_t, so just force the cast. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-27dix: Retype and repack GCAdam Jackson1-6/+6
LP64: 160 bytes before, 128 after. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-10-27dix: Always store GC client clip as a region (v2)Adam Jackson1-3/+2
Again, this changes FixesCreateRegionFromGC to throw BadMatch when fed a GC with no client clip. v2: Fix Xnest and some variable names (Keith) Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09Merge remote-tracking branch 'ajax/dead-code'Keith Packard1-3/+0
2014-10-09Merge remote-tracking branch 'ajax/mi-cleanup'Keith Packard3-11/+8
2014-10-09Use unique display name for each xi2 test program [v3]Alan Coopersmith1-0/+7
make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. v2: Fix Linux bits: Add #include <errno.h> to get a declaration of program_invocation_name on Linux. Use only the last portion of the pathname so that the resulting display name doesn't contain any slashes. v3: use program_invocation_short_name on Linux This is the same as program_invocation_name, except is has stripped off any path prefix. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-09dix: Lower backStorage to a bit instead of a pointerAdam Jackson1-1/+1
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09dix: Remove DIXsaveUnder bit from the WindowAdam Jackson1-1/+0
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09mi: Move pScreen->SendGraphicsExpose up to dixAdam Jackson2-7/+6
No DDX is overriding this and it's fairly absurd to expose it as a screen operation anyway. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09dix: Drop the third argument from WindowExposuresProcPtrAdam Jackson1-2/+1
A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08input: Remove unused SetKeySymsMapAdam Jackson1-3/+0
Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-22os: Don't listen to 'tcp' by default. Add '-listen' option. [v2]Keith Packard1-0/+9
This disables the tcp listen socket by default. Then, it uses a new xtrans interface, TRANS(Listen), to provide a command line option to re-enable those if desired. v2: Leave unix socket enabled by default. Add configure options. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-22XSERVER_DTRACE needs request names from registry tooKeith Packard1-1/+1
The dtrace code in the server wants to log the name of each executed request, which it gets from the registry. Use that as an additional indication of when that portion of the registry should be included in the server build. See: http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@gmail.com>
2014-09-18Build required portions of registry.c automatically [v2]Keith Packard1-24/+15
Instead of making the inclusion of the registry code a global conditional, split the registry into two pieces; the bits required by the X-Resource extension (the resource names) and the bits required by the XCSECURITY extension (the protocol names). Build each set of code if the related extension is being built. v2: Check for both XCSECURITY and XSELINUX. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-09-18dix: Close protocol.txt after we're done loading extension namesKeith Packard1-0/+1
Don't leave this file open during the whole server execution process; close it once all of the extensions are initialized. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-09-16xfree86: Remove the memory of MTRR awarenessAdam Jackson2-9/+0
pciaccess does this for us, and none of our internal hooks really remain. This does remove a cleanup pass from the BSD code, but the case it's covering (a previous server leaving MTRRs around) can't happen anymore. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-11pixmap: fix reverse optimus support with multiple headsDave Airlie2-0/+7
For doing reverese optimus to multiple outputs on a secondary GPU the GPU can store the blits into a large screen pixmap, unfortunately this means we need a destination offset into the dirty code, so add a new API that just adds this interface. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-31Add X_BYTE_ORDER to xorg-server.hKeith Packard1-0/+3
Drivers don't get to use dix-config.h, they use xorg-server.h instead. Add X_BYTE_ORDER to that file so drivers can see the value. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-07-31Check for dix-config.h or xorg-server.h before using X_BYTE_ORDERMichel Dänzer1-1/+4
Now that servermd.h depends on X_BYTE_ORDER being defined in dix-config.h or xorg-server.h, check to make sure one of those has been included before using the value. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-30Fix files including xorg-server.h by mistakeKeith Packard1-0/+4
A few files in the server are including xorg-server.h, which is only for use by Xorg server drivers. This fixes those errors and then adds a check to make sure it doesn't happen again. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-07-29os: Remove LocalClientCredAdam Jackson1-3/+0
The comment lies, shm hasn't used this code since: commit fdef7be5c8d5989e0aa453d0a5b86d0a6952e960 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 9 18:44:04 2007 -0700 Sun bug 6589829: include zoneid of shm segment in access [...] Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29os: Remove deprecated malloc/free wrappersAdam Jackson1-36/+1
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-24dix: Remove arch awareness from servermd.h (v2)Adam Jackson2-181/+7
At this point we have no architectures where image byte order is different from bitmap bit order, or where either of those two are not also the native word endianness. Hooray, one more place where we don't have to worry about enabling new CPU architectures. v2: Rebase to master to handle the addition of ppc64le, arc, and xtensa, and use autoconf's endianness detection instead of gcc predefines. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Remove a weird case of little-endian s390Adam Jackson1-2/+1
I really don't think this was ever correct, but I'm also not sure what non-Linux Unix this was meant to enable. The only one I know of was OS/390 / z/OS / OpenEdition, but I think that was big-endian too. At any rate this is all about to go away, so this is just removing an edge case. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Remove wacky sparc special casing (v2)Adam Jackson1-11/+0
This appears to be defining sparc if ever __sparc or __sparc__ were defined, which is almost reasonable, but these days we want to be using the __arch__ style. Why any of this would ever be triggered on m68k is truly a mystery for the ages. v2: Fix commit message, as noted by nix Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Default GLYPHPADBYTES to 4Adam Jackson1-48/+4
This effectively no longer varied across architectures anyway. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Remove some cfb leftoversAdam Jackson1-7/+0
These macros meant something in cfb, but not in fb. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Remove some dead macrosAdam Jackson1-4/+0
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: (Don't) change BITMAP_SCANLINE_UNIT on Linux s390{, x}Adam Jackson1-2/+0
Every other architecture sets this to 32, and I can't think of any benefit s390 would derive from changing it. It is, at any rate, something the client already copes with, and the only internal code impact seems to be some complicated math in miGetPlane, which you never hit if you're using fb. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Remove some XFree86 3.x leftoversAdam Jackson1-10/+0
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24dix: Remove an ancient IBM configurationAdam Jackson1-17/+0
Whatever unix this was meant to be is either no longer in circulation, or is AIX, which we don't claim to support anyway. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17config: Replace OdevAttributes linked list with structKeith Packard1-46/+23
OdevAttributes are a fixed set of values with known types; instead of storing them in a linked list and requiring accessor/settor functions, replace the list header, struct OdevAttributes, with a struct that directly contains the values. This provides for compile-time typechecking of the values, eliminates a significant amount of code and generally simplifies using this datatype. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-17Document how to correctly wrap screen proceduresKeith Packard1-0/+90
This adds a large comment to include/scrnintstr.h which should serve to document the correct way to wrap any screen procedure, with a particular focus on how to dynamically add/remove wrapping layers while the server is running. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17Avoid starting a comment with */*Peter Harris16-210/+201
Even though -Wcomment doesn't mind it (in gcc or clang), the appearance of */* confuses the syntax highlighter of some editors (eg. vim), and causes warnings in MSVC. Signed-off-by: Peter Harris <pharris@opentext.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-14config_odev_add_attribute*: Check for right attribute typeHans de Goede1-1/+1
Don't allow setting string attributes to integers and vice versa. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-14Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FDHans de Goede1-1/+1
Looks like the value of ODEV_ATTRIB_DRIVER was not updated when the patch adding it got rebased on top of a newer server version. This fixes the xserver crashing when systemd-logind integration is used. https://bugzilla.redhat.com/show_bug.cgi?id=1118540 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>