diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-02-10 17:30:05 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-11 04:03:45 -0500 |
commit | 961fb597c17e2e4f55407d56b7211c188ab41eff (patch) | |
tree | 14ec50b2d934c3dafac313b5adf53df1e32be107 /drivers/gpu/drm/radeon/Makefile | |
parent | 4c36b678a23d33b82d614afe4f958a9d244ede5d (diff) |
drm/radeon/kms: r600/r700 command stream checker
This patch add cs checker to r600/r700 hw. Command stream checking
will rewrite some of the cs value in order to restrict GPU access
to BO size. This doesn't break old userspace but just enforce safe
value. It should break any things that was using the r600/r700 cs
ioctl to do forbidden things (malicious software), though we are
not aware of such things.
Here is the list of thing we check :
- enforcing resource size
- enforcing color buffer slice tile max, will restrict cb access
- enforcing db buffer slice tile max, will restrict db access
We don't check for shader bigger than the BO in which they are
supposed to be, such use would lead to GPU lockup and is harmless
from security POV, as far as we can tell (note that even checking
for this wouldn't prevent someone to write bogus shader that lead
to lockup).
This patch has received as much testing as humanly possible with
old userspace to check that it didn't break such configuration.
However not all the applications out there were tested, thus it
might broke some odd, rare applications.
[airlied: fix rules for cs checker for parallel builds]
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/Makefile')
-rw-r--r-- | drivers/gpu/drm/radeon/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile index 83c59079193b..b46f115d1c25 100644 --- a/drivers/gpu/drm/radeon/Makefile +++ b/drivers/gpu/drm/radeon/Makefile | |||
@@ -30,6 +30,9 @@ $(obj)/r420_reg_safe.h: $(src)/reg_srcs/r420 $(obj)/mkregtable | |||
30 | $(obj)/rs600_reg_safe.h: $(src)/reg_srcs/rs600 $(obj)/mkregtable | 30 | $(obj)/rs600_reg_safe.h: $(src)/reg_srcs/rs600 $(obj)/mkregtable |
31 | $(call if_changed,mkregtable) | 31 | $(call if_changed,mkregtable) |
32 | 32 | ||
33 | $(obj)/r600_reg_safe.h: $(src)/reg_srcs/r600 $(obj)/mkregtable | ||
34 | $(call if_changed,mkregtable) | ||
35 | |||
33 | $(obj)/r100.o: $(obj)/r100_reg_safe.h $(obj)/rn50_reg_safe.h | 36 | $(obj)/r100.o: $(obj)/r100_reg_safe.h $(obj)/rn50_reg_safe.h |
34 | 37 | ||
35 | $(obj)/r200.o: $(obj)/r200_reg_safe.h | 38 | $(obj)/r200.o: $(obj)/r200_reg_safe.h |
@@ -42,6 +45,8 @@ $(obj)/r420.o: $(obj)/r420_reg_safe.h | |||
42 | 45 | ||
43 | $(obj)/rs600.o: $(obj)/rs600_reg_safe.h | 46 | $(obj)/rs600.o: $(obj)/rs600_reg_safe.h |
44 | 47 | ||
48 | $(obj)/r600_cs.o: $(obj)/r600_reg_safe.h | ||
49 | |||
45 | radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \ | 50 | radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \ |
46 | radeon_irq.o r300_cmdbuf.o r600_cp.o | 51 | radeon_irq.o r300_cmdbuf.o r600_cp.o |
47 | # add KMS driver | 52 | # add KMS driver |