Commit Graph

229 Commits

Author SHA1 Message Date
matthieu
ad9a065c46 Release unused filedescriptors in the privileged X server process.
There is no reason to keep /dev/pci* and /dev/ttyC* open in this process.
pointed to  by deraadt. ok kettenis@ deraadt@
2020-04-20 18:17:25 +00:00
matthieu
806accb3da Remove unused files. 2020-04-18 09:41:18 +00:00
matthieu
9064f8eee5 Update to xserver 1.20.8. ok jsg@ robert@ 2020-04-13 08:06:58 +00:00
kettenis
fb24e5a8dd Use modesetting driver as the default for rkdrm(4).
ok patrick@, jsg@
2020-03-04 21:07:12 +00:00
matthieu
40d42722f6 Update to xserver 1.20.7 plus 2 extra fixes from upstream. ok jsg@ 2020-01-26 13:48:54 +00:00
matthieu
9a532c5475 Update to X server 1.20.6. Tested by naddy@ 2019-12-12 06:05:17 +00:00
kettenis
35220e47ea Add modesetting driver as a fall-back when appropriate such that we can
use it when running withour root privileges which prevents us from
scanning the PCI bus.

This makes startx(1)/xinit(1) work again on modern systems with inteldrm(4),
radeondrm(4) and amdgpu(4).  In some cases this will result in using a
different driver than with xenodm(4) which may expose issues (e.g. when
we prefer the intel Xorg driver) or loss of acceleration (e.g. older
cards supported by radeondrm(4)).

ok jsg@, matthieu@
2019-09-15 12:31:08 +00:00
jsg
5e7792301a sync i965 pci ids with xserver git master
ok matthieu@
2019-08-24 01:20:16 +00:00
jsg
38e2fafc5f remove duplicate ids added by patch in xserver 1.20.5 update
ok matthieu@
2019-08-24 01:15:31 +00:00
matthieu
1e4dc55ae1 Don't prune duplicate modes there.
This function removes too many modes, causing trouble with the vesa
driver at least.  Problem reported by semarie@. Thanks.
2019-08-15 14:48:45 +00:00
matthieu
95df71afbd Remove files that are no longer part of upstream tarballs.
They accumulated over releases for various reasons.
No build change.
2019-08-03 16:56:01 +00:00
matthieu
a77e9959f3 Update to xserver 1.20.5. Tested by jsg@ 2019-07-27 07:57:06 +00:00
jsg
4fd0ec7f37 Backport cf7517675d988c2d1ff967d6d162a17acbdad46 from xserver 1.20
xfree86: Hold input_lock across SPRITE functions in VGA arbiter

Fixes stack overflow crash with VGA arbiter used with multi GPU systems.
Report and fix identified by 'Joe M' on misc@. ok matthieu@
2019-04-28 03:12:53 +00:00
matthieu
e7e87a2ccb Update to xserver 1.19.7. Tested by jca@ and stsp@. 2019-03-19 21:19:54 +00:00
jsg
c423099260 sync xserver dri2 pci_ids with the latest Mesa
the modesetting driver uses these to pick a dri driver name

ok phessler@ kettenis@ matthieu@
2019-02-18 02:41:24 +00:00
matthieu
5a9c7d77ed Call xf86OpenConsole() before probing for drivers.
On OpenBSD, we need the console fd to query wsdisplay type,
This was only causing problems with -keepPriv, since the privilege
separation code already calls xf86OpenConsole() earlier.
The function is idempotent, so there's no harm calling it
several times.
ok kettenis@
2019-01-03 19:31:25 +00:00
matthieu
2d6e93a5b7 MFC: Disable -logfile and -modulepath when running with elevated
privileges.  This Could cause arbitrary files overwrite.
CVE-2018-14665.
2018-10-25 15:44:27 +00:00
kettenis
8869fa7f9c Initialize PCI subsystem on arm64.
ok matthieu@
2018-08-20 21:48:55 +00:00
jcs
13d37ac4fa modesetting: setup colormap
Fixes utilities like xcalib

Upstream xorg commit ac138f9b31b0fba00742edbc3326afe66e28099a
ok matthieu
2018-04-19 14:52:34 +00:00
matthieu
857585fc69 Update to xserver 1.19.6. bug fix release 2018-02-18 17:16:37 +00:00
matthieu
6906cf1bc7 Remove code to pull softfloat libs.
It was needed at some point in the past, but doesn't compile and
isn't needed with clang. Reported by jsg@.
2018-01-20 12:25:26 +00:00
robert
b8144c0647 watch for events sent by drm(4) over kevent using EVFILT_DEVICE
and NOTE_CHANGE to notify the desktop environment to deal with
the change (e.g. after plugging in an HDMI cable)

with this change there is no need to manually do any randr commands
if your desktop environment supports it (gnome, mate, kde, etc.)

ok matthieu@, kettenis@
2018-01-15 15:30:36 +00:00
matthieu
1a66cad3fb Update to xserver 1.19.5.
Tested by bru@, jsg@ and others
2017-12-08 15:01:59 +00:00
matthieu
515a707d86 MFC: hw/xfree86: unvalidated lengths
This addresses:
CVE-2017-12180 in XFree86-VidModeExtension
CVE-2017-12181 in XFree86-DGA
CVE-2017-12182 in XFree86-DRI
2017-10-14 09:24:30 +00:00
matthieu
3b3c79f0b0 MFC: Unvalidated lengths
v2: Add overflow check and remove unnecessary check (Julien Cristau)

This addresses:
CVE-2017-12184 in XINERAMA
CVE-2017-12185 in MIT-SCREEN-SAVER
CVE-2017-12186 in X-Resource
CVE-2017-12187 in RENDER
2017-10-14 09:20:42 +00:00
matthieu
c6ab499027 Force Intel Ironlake chipsets to use the xf86-video-intel driver.
stsp@ reported that modesetting(4) has been reported unreliable
on his laptop, while intel(4) works.

XXXX to be removed after 6.2 to figure out and fix the issue.

ok kettenis@, also discussed briefly with deraadt@ during EuroBSDCon.
2017-09-25 15:05:57 +00:00
matthieu
b8da768ee9 Disable SSE optimizations on i386/amd64 for SlowBcopy.
It is supposed to be slow, and when such instructions are used to copy
data from/to mapped video memory, some hypervisors (e.g. KVM,
Microsoft Hyper-V) can generate SIGILL or SIGBUS exceptions, causing
Xorg to crash.

Bug report to OpenBSD by Max Parmer, fix from FreeBSD (Dimitry Andric)
via kettenis@

ok kettenis@
2017-08-07 19:17:56 +00:00
kettenis
38475bb3b2 Create on OpenBSD-specific version of listPossibleVideoDrivers() that takes
care of autoconfiguration based on the information returned by the
WSDISPLAYIO_GTYPE ioctl of the console FD.  This should fix selection of
wsfb on loongson and sgi when using a non-KMS kernel driver.

ok matthieu@, jsg@
2017-08-07 12:30:34 +00:00
kettenis
d74e2cb101 Use the modesetting driver by default on 4th generation Intel Graphics and
later.  This matches what several Linux distros do these days as it tends to
work better than the intel driver in most cases.

There are some performance issues with vncviewer on at least Ivy Bridge and
Haswell.  But for now that regression outweighs the benefits.

ok robert@, tedu@, sthen@
2017-07-14 11:38:05 +00:00
kettenis
11bfbfff1e Add code to update the value of the RandR "Backlight" property based on the
KMS connector property of the same name if such a property is present.

ok matthieu@
2017-07-12 20:08:07 +00:00
visa
55a8e552e5 Make X work with radeondrm(4) hardware on loongson.
OK jsg@
2017-05-21 13:18:29 +00:00
jsg
f372d76f12 make xserver build on arm64
ok matthieu@
2017-03-07 03:40:33 +00:00
matthieu
fd18c20e72 regen 2016-10-11 22:14:30 +00:00
matthieu
6e1bcfb3c6 Update to xserver 1.18.4
tested by krw@ and dcoppa@ ok dcoppa@
2016-08-09 18:59:50 +00:00
matthieu
185312ce1c xserver: fix an off-by-one error that lead to asprintf("%s", NULL)
reported by deraadt@, fix reviewed in X.Org by Keith Packard.
2016-08-03 19:31:23 +00:00
matthieu
e927c03e30 Update to xserver 1.18.3. Tested by shadchin@ and naddy@.
Note that indirect GLX is now disbled by default.
2016-05-29 12:02:34 +00:00
matthieu
6b14cdf954 Fix white space/indentation to match X.Org style. 2016-04-24 17:21:55 +00:00
matthieu
a009af0b91 Fall back to /dev/ttyC0 when the console device is not a wsdisplay(4)
Problem noticed by sthen@.
2016-04-24 17:20:04 +00:00
matthieu
3b5e851da5 Implement VT switching (based on the USL compat interface) in the
wscons console backend and use it by default.
ok kettenis@
2016-04-02 14:25:10 +00:00
matthieu
e44b23d20c Make alpha_video.c build in recent X server.
Completely broken on VGA cards (libpciaccess doesn't know about
the alpha specific ways of mapping the PCI space),
only XRender is broken on TGA cards.
2016-03-27 18:48:41 +00:00
matthieu
ab587bced4 Cleanup gcc warnings and function prototypes. 2016-03-06 17:11:46 +00:00
matthieu
926017f7f5 Fix typo introduced 5.5 years ago.
Note: this changes the #if test result, but the now #ifdef out code
has no effect.
2016-03-06 16:09:27 +00:00
kettenis
ed4591c1ef On Broadwell, default to using the modesetting driver. Our KMS support on
Broadwell is still a bit weak and the modesetting driver seems to work
better than the intel driver, while still providing 3D acceleration and
video playback support.

ok phessler@, matthieu@, jsg@
2015-12-21 08:37:11 +00:00
matthieu
1e036e407b Remove the -configure option. This has been broken for a loong time
and no one is going to fix it.
2015-11-15 08:28:24 +00:00
matthieu
4c6a4e1e00 Update to xserver 1.17.4.
tested by naddy@
2015-11-07 16:48:51 +00:00
matthieu
f00e3078a0 Reduce white space diff with upstreams. No other change. 2015-10-25 15:24:06 +00:00
matthieu
e957e25538 Post xserver 1.17 cleanup 2015-09-28 07:14:00 +00:00
matthieu
5f3337aec0 Post-xserver 1.17 cleanup. 2015-09-28 06:20:25 +00:00
matthieu
1867e4b0c7 Post xserver 1.17 cleanup. Remove now unused functions. 2015-09-28 06:00:47 +00:00
matthieu
11ed0dd96c Update for xserver 1.17 2015-09-28 05:59:26 +00:00