linux-uconsole/drivers
Dave Airlie 6f4de4a36e drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond
commit 566d84d172 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-05 11:10:54 -07:00
..
accessibility
acpi ACPI: video: fix acpi_backlight=video 2010-07-05 11:10:33 -07:00
amba
ata libata: don't flush dcache on slab pages 2010-07-05 11:10:31 -07:00
atm
auxdisplay
base drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline 2010-07-05 11:10:40 -07:00
block cciss: Make cciss_seq_show handle holes in the h->drv[] array 2010-02-23 07:37:49 -08:00
bluetooth Bluetooth: Prevent ill-timed autosuspend in USB driver 2010-01-06 15:03:43 -08:00
cdrom
char x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems 2010-05-12 14:57:06 -07:00
clocksource clocksource: Fix up a registration/IRQ race in the sh drivers. 2010-03-15 08:49:44 -07:00
connector connector: Delete buggy notification code. 2010-02-09 04:50:59 -08:00
cpufreq [CPUFREQ] Fix stale cpufreq_cpu_governor pointer 2009-11-17 23:15:04 -05:00
cpuidle cpuidle: Fix incorrect optimization 2010-05-12 14:57:16 -07:00
crypto crypto: padlock-sha - Add import/export support 2010-02-23 07:37:54 -08:00
dca
dio
dma ioat: fix infinite timeout checking in ioat2_quiesce 2010-02-23 07:37:49 -08:00
edac edac, mce: Fix wrong mask and macro usage 2010-05-12 14:57:05 -07:00
eisa
firewire firewire: core: add_descriptor size check 2010-02-09 04:50:52 -08:00
firmware DMI: allow omitting ident strings in DMI tables 2010-01-28 15:01:52 -08:00
gpio gpiolib: Actually set output state in wm831x_gpio_direction_output() 2010-03-15 08:49:57 -07:00
gpu drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond 2010-07-05 11:10:54 -07:00
hid HID: Add the GYR4101US USB ID to hid-gyration 2010-07-05 11:10:33 -07:00
hwmon hp_accel: fix race in device removal 2010-05-26 14:29:13 -07:00
i2c i2c: Fix probing of FSC hardware monitoring chips 2010-05-12 14:57:04 -07:00
ide slc90e66: fix UDMA handling 2009-12-18 14:05:04 -08:00
idle
ieee1394
ieee802154 ieee802154: dont leak skbs in ieee802154_fake_xmit() 2009-11-19 13:16:21 -08:00
infiniband IB/iser: Rewrite SG handling for RDMA logic 2010-04-26 07:41:36 -07:00
input Input: wacom - switch mode upon system resume 2010-04-26 07:41:34 -07:00
isdn gigaset: prune use of tty_buffer_request_room 2010-04-01 15:58:24 -07:00
leds leds-gpio: fix default state handling on OF platforms 2010-04-01 15:58:53 -07:00
lguest lguest: fix bug in setting guest GDT entry 2010-01-06 15:05:19 -08:00
macintosh macintosh/therm_adt746x: Fix sysfs attributes lifetime 2010-03-15 08:49:46 -07:00
mca
md md: set mddev readonly flag on blkdev BLKROSET ioctl 2010-07-05 11:10:46 -07:00
media V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver 2010-07-05 11:10:33 -07:00
memstick
message mptspi: Fix for incorrect data underrun errata 2010-04-26 07:41:36 -07:00
mfd mfd: WM835x GPIO direction register is not locked 2010-01-22 15:18:18 -08:00
misc SCSI: enclosure: fix oops while iterating enclosure_status array 2010-01-25 10:49:37 -08:00
mmc mmc: atmel-mci: remove data error interrupt after xfer 2010-05-26 14:29:15 -07:00
mtd UBI: fix volume creation input checking 2010-02-09 04:50:45 -08:00
net mlx4_core: Fix possible chunk sg list overflow in mlx4_alloc_icm() 2010-07-05 11:10:51 -07:00
nubus
of
oprofile oprofile: remove double ring buffering 2010-07-05 11:10:27 -07:00
parisc
parport
pci PCI: Disable MSI for MCP55 on P5N32-E SLI 2010-07-05 11:10:41 -07:00
pcmcia PCI/cardbus: Add a fixup hook and fix powerpc 2010-01-22 15:18:26 -08:00
platform eeepc-laptop: disable wireless hotplug for 1005PE 2010-04-26 07:41:23 -07:00
pnp
power
pps pps: events reporting fix up 2009-11-12 07:26:01 -08:00
ps3
rapidio
regulator regulator: Fix display of null constraints for regulators 2010-02-23 07:37:49 -08:00
rtc rtc: s3c: initialize driver data before using it 2010-07-05 11:10:49 -07:00
s390 dasd: remove strings from s390dbf 2010-02-23 07:37:54 -08:00
sbus
scsi megaraid_sas: fix for 32bit apps 2010-05-26 14:29:20 -07:00
serial serial: imx.c: fix CTS trigger level lower to avoid lost chars 2010-05-26 14:29:16 -07:00
sfi
sh
sn
spi SPI: spi_txx9: Fix bit rate calculation 2009-12-02 23:58:32 +00:00
ssb ssb: Fix range check in sprom write 2009-12-18 14:03:24 -08:00
staging staging: vt6655: Fix kernel BUG on driver wpa initialization 2010-07-05 11:10:29 -07:00
tc
telephony
thermal acpi: thermal: Add EOL to the trip_point_N_type strings 2009-11-05 17:33:24 -05:00
uio uio: pm_runtime_disable is needed if failed 2009-11-13 11:36:00 +09:00
usb USB: xHCI: Fix wrong usage of macro TRB_TYPE 2010-07-05 11:10:38 -07:00
uwb
video fbdev: bfin-t350mcqb-fb: fix fbmem allocation with blanking lines 2010-05-26 14:29:14 -07:00
virtio virtio: fix out of range array access 2010-04-01 15:58:18 -07:00
vlynq
w1 w1: w1 temp: fix negative termperature calculation 2010-05-12 14:57:00 -07:00
watchdog WATCHDOG: iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs 2010-04-26 07:41:18 -07:00
xen xen: fix hang on suspend. 2010-01-18 10:19:44 -08:00
zorro
Kconfig
Makefile virtio: initialize earlier 2010-05-12 14:57:15 -07:00