linux_dsm_epyc7002/drivers/gpu/drm/radeon
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
..
reg_srcs drm/radeon/kms: r600/r700 command stream checker 2010-02-11 19:03:45 +10:00
.gitignore
atom-bits.h
atom-names.h
atom-types.h
atom.c drm/radeon/kms: use udelay for short delays 2010-02-09 09:32:32 +10:00
atom.h drm/radeon/kms/atom: upstream parser updates 2010-01-21 08:20:28 +10:00
atombios_crtc.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
atombios_dp.c drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
atombios.h drm/radeon/kms: update atombios.h to latest upstream. 2010-02-09 09:44:01 +10:00
avivod.h [rfc] drm/radeon/kms: pm debugging check for vbl. 2010-02-23 09:46:21 +10:00
evergreen_reg.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
evergreen.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
Kconfig
Makefile drm/radeon/kms: r600/r700 command stream checker 2010-02-11 19:03:45 +10:00
mkregtable.c
ObjectID.h
r100_track.h
r100.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
r100d.h
r200.c drm/radeon: Add asic hook for dma copy to r200 cards. 2010-02-18 14:47:54 +10:00
r300_cmdbuf.c drm/radeon: Fix memory allocation failures in the preKMS command stream checking. 2010-02-23 09:46:20 +10:00
r300_reg.h drm/radeon/kms: add support for square microtiles on r3xx-r5xx 2010-02-25 11:36:12 +10:00
r300.c drm/radeon/kms: add support for square microtiles on r3xx-r5xx 2010-02-25 11:36:12 +10:00
r300d.h
r420.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
r420d.h
r500_reg.h drm/radeon/kms: add support for hw i2c on r1xx-r5xx 2010-02-09 09:31:10 +10:00
r520.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
r520d.h
r600_audio.c drm/radeon/kms: isolate audio engine management, change fini order 2010-02-18 14:23:40 +10:00
r600_blit_kms.c drm/radeon: use ALIGN instead of open coding it 2010-03-01 15:56:41 +10:00
r600_blit_shaders.c drm/radeon/kms/r600: reduce gpu cache flushing 2010-02-09 09:32:24 +10:00
r600_blit_shaders.h
r600_blit.c drm/radeon: use ALIGN instead of open coding it 2010-03-01 15:56:41 +10:00
r600_cp.c drm/radeon: fixes for r6xx/r7xx gfx init 2010-02-23 09:46:23 +10:00
r600_cs.c drm/radeon/r600: fix warnings in CS checker 2010-02-18 14:20:58 +10:00
r600_hdmi.c
r600_reg.h
r600.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
r600d.h drm/radeon/kms: r600/r700 command stream checker 2010-02-11 19:03:45 +10:00
radeon_agp.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon_asic.h drm/radeon/kms: initialize set_surface_reg reg for rs600 asic 2010-03-01 15:50:37 +10:00
radeon_atombios.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_benchmark.c
radeon_bios.c drm/radeon/kms: check for valid PCI bios and not OF rom 2010-02-11 19:04:07 +10:00
radeon_clocks.c drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_combios.c drm/radeon/kms: simplify storing current and requested PM mode 2010-02-23 09:46:51 +10:00
radeon_connectors.c drm/radeon/kms: add radeon i2c algo 2010-02-05 15:10:19 +10:00
radeon_cp.c drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond 2010-03-01 16:08:22 +10:00
radeon_cs.c drm/radeon/kms: fix bo's fence association 2010-02-16 07:59:37 +10:00
radeon_cursor.c drm/radeon/kms/evergreen: fix typo in cursor code 2010-02-25 11:29:56 +10:00
radeon_device.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon_display.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_drv.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_drv.h drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond 2010-03-01 16:08:22 +10:00
radeon_encoders.c drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_family.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_fb.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon_fence.c
radeon_fixed.h
radeon_gart.c drm/radeon/kms: set gart pages to invalid on unbind and point to dummy page 2010-02-11 19:11:32 +10:00
radeon_gem.c drm/radeon/kms: fix regression rendering issue on R6XX/R7XX 2010-02-05 11:43:51 +10:00
radeon_i2c.c drm/radeon/kms/evergreen: adapt to i2c changes 2010-02-11 13:39:12 +10:00
radeon_ioc32.c
radeon_irq_kms.c
radeon_irq.c
radeon_kms.c drm/radeon/kms: switch all KMS driver ioctls to unlocked. 2010-02-09 09:32:24 +10:00
radeon_legacy_crtc.c drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_legacy_encoders.c drm/radeon/kms: add dynamic engine reclocking (V9) 2010-02-09 09:32:26 +10:00
radeon_legacy_tv.c
radeon_mem.c
radeon_mode.h drm/radeon/kms: update new pll algo 2010-02-25 11:38:06 +10:00
radeon_object.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
radeon_object.h drm/radeon/kms: fix bo's fence association 2010-02-16 07:59:37 +10:00
radeon_pm.c drm/radeon/kms: implement reading active PCIE lanes on R600+ 2010-02-23 09:48:56 +10:00
radeon_reg.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00
radeon_ring.c drm/radeon/kms: fix indirect buffer management V2 2010-02-16 07:59:23 +10:00
radeon_state.c drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond 2010-03-01 16:08:22 +10:00
radeon_test.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon_ttm.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
radeon.h drm/radeon/kms: implement reading active PCIE lanes on R600+ 2010-02-23 09:48:56 +10:00
rs100d.h
rs400.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
rs400d.h
rs600.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
rs600d.h
rs690.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
rs690d.h
rv200d.h
rv250d.h
rv350d.h
rv515.c drm/radeon/kms: simplify memory controller setup V2 2010-02-18 14:49:35 +10:00
rv515d.h
rv770.c drm/radeon/kms: force pinning buffer into visible VRAM 2010-02-25 11:32:36 +10:00
rv770d.h drm/radeon/kms: add initial Evergreen support (Radeon HD 5xxx) 2010-02-09 09:44:02 +10:00