linux_dsm_epyc7002/drivers/gpu/drm
Dave Airlie 566d84d172 drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond
radeon's have a special ability to passthrough writes in their internal
memory space directly to PCI, this ability means that if some of the internal
surfaces like the depth buffer point at 0x0, any writes to these will
go directly to RAM at 0x0 via PCI busmastering.

Now mesa used to always emit clears after emitting state, since the
radeon mesa driver was refactored a year or more ago, it was found it
could generate a clear request without ever sending any setup state to the
card. So the clear would attempt to clear the depth buffer at 0x0, which
would overwrite main memory at this point. fs corruption ensues.

Also once one app did this correctly, it would never get set back to 0
making this messy to reproduce.

The kernel should block this from happening as mesa runs without privs,
though it does require the user be connected to the current running X session.

This patch implements a check to make sure the depth offset has been set
before a depth clear occurs and if it finds one it prints a warning and
ignores the depth clear request. There is also a mesa fix to avoid sending
the badness going into mesa.

This only affects r100/r200 GPUs in user modesetting mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-01 16:08:22 +10:00
..
i2c
i810
i830
i915
mga
nouveau drm/nv50: prevent switching off SOR when in use for DVI-over-DP 2010-01-25 10:35:33 +10:00
r128
radeon drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond 2010-03-01 16:08:22 +10:00
savage
sis
tdfx
ttm drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c 2010-02-01 11:27:25 +10:00
via
vmwgfx drm/vmwgfx: Don't send bad flags to the host 2010-02-01 11:29:59 +10:00
ati_pcigart.c ati_pcigart: fix printk format warning 2010-02-05 11:46:48 +10:00
drm_agpsupport.c
drm_auth.c
drm_buffer.c drm: Add generic multipart buffer. 2010-02-23 09:46:20 +10:00
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc_helper.c
drm_crtc.c
drm_debugfs.c
drm_dma.c
drm_dp_i2c_helper.c
drm_drawable.c
drm_drv.c
drm_edid.c drm/radeon/kms: add support for hardcoded edids in rom (v2) 2010-02-09 09:31:20 +10:00
drm_encoder_slave.c
drm_fb_helper.c drm: fix regression in fb blank handling 2010-01-25 16:04:47 +10:00
drm_fops.c
drm_gem.c
drm_hashtab.c
drm_info.c
drm_ioc32.c
drm_ioctl.c
drm_irq.c
drm_lock.c
drm_memory.c
drm_mm.c
drm_modes.c
drm_pci.c
drm_proc.c
drm_scatter.c
drm_sman.c
drm_stub.c
drm_sysfs.c
drm_vm.c
Kconfig drm/radeon/kms: move radeon KMS on/off switch out of staging. 2010-02-01 11:35:47 +10:00
Makefile drm: Add generic multipart buffer. 2010-02-23 09:46:20 +10:00
README.drm

************************************************************
* For the very latest on DRI development, please see:      *
*     http://dri.freedesktop.org/                          *
************************************************************

The Direct Rendering Manager (drm) is a device-independent kernel-level
device driver that provides support for the XFree86 Direct Rendering
Infrastructure (DRI).

The DRM supports the Direct Rendering Infrastructure (DRI) in four major
ways:

    1. The DRM provides synchronized access to the graphics hardware via
       the use of an optimized two-tiered lock.

    2. The DRM enforces the DRI security policy for access to the graphics
       hardware by only allowing authenticated X11 clients access to
       restricted regions of memory.

    3. The DRM provides a generic DMA engine, complete with multiple
       queues and the ability to detect the need for an OpenGL context
       switch.

    4. The DRM is extensible via the use of small device-specific modules
       that rely extensively on the API exported by the DRM module.


Documentation on the DRI is available from:
    http://dri.freedesktop.org/wiki/Documentation
    http://sourceforge.net/project/showfiles.php?group_id=387
    http://dri.sourceforge.net/doc/

For specific information about kernel-level support, see:

    The Direct Rendering Manager, Kernel Support for the Direct Rendering
    Infrastructure
    http://dri.sourceforge.net/doc/drm_low_level.html

    Hardware Locking for the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/hardware_locking_low_level.html

    A Security Analysis of the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/security_low_level.html