XF86(4)
π
XF86(4) β X Window System aperture driver π
okay bestie, this is the XF86(4) page from the Kernel Interfaces Manual, and itβs literally the X Window System aperture driver. Section 4 energy, no cap. Letβs get into it. β¨
πΈ NAME πΈ
xf86 β X Window System aperture driver π¦
β¨ SYNOPSIS β¨
option APERTURE
π«Ά DESCRIPTION π«Ά
On the alpha, amd64, i386, macppc, and sparc64 architectures, the /dev/xf86 driver provides access to the memory and I/O ports of a VGA board and to the PCI configuration registers for use by the X servers when running with a kernel security level greater than 0.
The X servers require the use of this driver for isa(4) or pci(4) video cards on alpha, amd64, i386, macppc, and sparc64. Like, required required. π
π ACCESS CONTROL π
Access to the /dev/xf86 device is allowed when the sysctl(8) variable machdep.allowaperture is greater than or equal to 1.
This variable (which has a default value of 0) can only be raised when the security level is less than or equal to 0, so it should be set in /etc/sysctl.conf.
The possible values for machdep.allowaperture are:
0β the aperture driver is disabled. Opening it returnsEPERM.1β the aperture driver allows access to standard VGA framebuffer and BIOS. Access topci(4)configuration registers is also allowed.2β in addition to allowing access topci(4)configuration registers, the aperture driver allows access to the whole first megabyte of physical memory, permitting use of theint10emulation inX.Org 6.8and later. Note that this can cause some security problems, since the process that has access to the aperture driver can also access part of the kernel memory. This mode is not supported onalphaorsparc64.3β the aperture driver allows multiple processes to concurrently accesspci(4)configuration registers and the whole first megabyte of physical memory.
π¨ real talk: value 2 comes with the security caveat above β thatβs straight from the page, bestie. Donβt gloss over it.
π SEE ALSO π
Xorg(1), options(4), pci(4), sysctl.conf(5), securelevel(7), config(8), sysctl(8) π
π°οΈ HISTORY π°οΈ
/dev/xf86 was integrated as an in-kernel device on OpenBSD 2.3.
It is required in order to allow access to I/O ports for all X servers since OpenBSD 2.4.
π AUTHORS π
The aperture driver was written by Matthieu Herrb. β¨
π BUGS π
This driver allows access to all addresses above physmem. It should be restricted to the actual address range of the video memory.
π no cap, thatβs the bug note. Itβs giving βworks, but not as tightly scoped as it should be.β
π source/version + date tea: Debian, May 28, 2015, XF86(4). Stay slay, bestie β periodt. π
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 1998 Matthieu Herrb
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms