29681587b0
This release is intended for general distro inclusion, Testing has been performed on various linux distros, FreeBSD 10.1 and Solaris 11.2. This release contains a number of build fixes and also changes to deal with improved vmmouse port security and backoff if a vmmouse kernel module is encountered. An additional dependency on libudev is introduced on linux. Note that if the new linux 4.1 vmmouse functionality is used, the user-space xf86-input-vmmouse driver can be skipped. Distros that want to keep the xf86-input-vmmouse driver as a backup should *not* use any version prior to 13.0.99 since those versions would compete with the in-kernel vmmouse driver for mouse input. 13.1.0: Thomas Hellstrom (1): Bump version number for release 13.0.99: Gaetan Nadon (6): Autoconf: remove AC_PROG_CC which overrides AC_PROG_CC_C99 from util-macros Autoconf: replace deprecated AC_HELP_STRING with AS_HELP_STRING Autoconf: minimum level required is 2.60 Autoconf: Fix deprecated use of AC_OUTPUT "make dist" fails when workstation has no udev package tools: make install fails when user has no write permission in /lib Jeremy Huddleston Sequoia (1): Always include config.h first Loïc Yhuel (1): Fix wheel button labels Peter Hutterer (4): Free the vmmouse data on UnInit Handle DEVICE_ABORT on ABI 19.1 Don't de-reference pMse if it hasn't been initialised yet Drop AM_MAINTAINER_MODE Stefan Dirsch (1): vmmouse_client.h: Include xorg-server.h before xf86_OSproc.h Thomas Hellstrom (5): Back off if we detect a vmmouse kernel driver v3 vmmouse: Run vmmouse_detect as an io privileged process vmmouse: Add support for the access restrict command vmmouse: Fix vmmouse_detect build on BSD vmmouse: Bump version number for release
81 lines
1.9 KiB
C
81 lines
1.9 KiB
C
$NetBSD: patch-tools_vmmouse__iopl.c,v 1.1 2015/06/29 11:15:05 wiz Exp $
|
|
|
|
--- tools/vmmouse_iopl.c.orig 2015-04-09 06:04:46.000000000 +0000
|
|
+++ tools/vmmouse_iopl.c
|
|
@@ -44,8 +44,15 @@
|
|
|
|
#if defined(VMMOUSE_OS_BSD)
|
|
#include <sys/types.h>
|
|
-#ifdef USE_I386_IOPL
|
|
+#if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL) || defined(USE_X86_64_IOPL)
|
|
#include <machine/sysarch.h>
|
|
+#if defined(USE_I386_IOPL)
|
|
+#define IOPL_NAME i386_iopl
|
|
+#elif defined(USE_AMD64_IOPL)
|
|
+#define IOPL_NAME amd64_iopl
|
|
+#elif defined(USE_X86_64_IOPL)
|
|
+#define IOPL_NAME x86_64_iopl
|
|
+#endif
|
|
/***************************************************************************/
|
|
/* I/O Permissions section */
|
|
/***************************************************************************/
|
|
@@ -57,7 +64,7 @@ xf86EnableIO()
|
|
if (ExtendedEnabled)
|
|
return true;
|
|
|
|
- if (i386_iopl(1) < 0)
|
|
+ if (IOPL_NAME(1) < 0)
|
|
return false;
|
|
|
|
ExtendedEnabled = true;
|
|
@@ -70,48 +77,13 @@ xf86DisableIO()
|
|
if (!ExtendedEnabled)
|
|
return;
|
|
|
|
- i386_iopl(0);
|
|
+ IOPL_NAME(0);
|
|
|
|
ExtendedEnabled = false;
|
|
return;
|
|
}
|
|
|
|
-#endif /* USE_I386_IOPL */
|
|
-
|
|
-#ifdef USE_AMD64_IOPL
|
|
-#include <machine/sysarch.h>
|
|
-/***************************************************************************/
|
|
-/* I/O Permissions section */
|
|
-/***************************************************************************/
|
|
-
|
|
-static bool ExtendedEnabled = false;
|
|
-
|
|
-bool
|
|
-xf86EnableIO()
|
|
-{
|
|
- if (ExtendedEnabled)
|
|
- return true;
|
|
-
|
|
- if (amd64_iopl(1) < 0)
|
|
- return false;
|
|
-
|
|
- ExtendedEnabled = true;
|
|
- return true;
|
|
-}
|
|
-
|
|
-void
|
|
-xf86DisableIO()
|
|
-{
|
|
- if (!ExtendedEnabled)
|
|
- return;
|
|
-
|
|
- if (amd64_iopl(0) == 0)
|
|
- ExtendedEnabled = false;
|
|
-
|
|
- return;
|
|
-}
|
|
-
|
|
-#endif /* USE_AMD64_IOPL */
|
|
+#endif /* defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL) || defined(USE_X86_64_IOPL) */
|
|
|
|
#ifdef USE_DEV_IO
|
|
#include <sys/stat.h>
|