drm/radeon/kms: r600/r700 command stream checker

Previous thread: drm/radeon/kms: accept slightly overclocked power modes by Linux Kernel Mailing List on Thursday, March 4, 2010 - 10:00 am. (1 message)

Next thread: regulator: Add notifier event on regulator disable by Linux Kernel Mailing List on Thursday, March 4, 2010 - 10:00 am. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, March 4, 2010 - 10:00 am

Gitweb:     http://git.kernel.org/linus/961fb597c17e2e4f55407d56b7211c188ab41eff
Commit:     961fb597c17e2e4f55407d56b7211c188ab41eff
Parent:     4c36b678a23d33b82d614afe4f958a9d244ede5d
Author:     Jerome Glisse <jglisse@redhat.com>
AuthorDate: Wed Feb 10 22:30:05 2010 +0000
Committer:  Dave Airlie <airlied@redhat.com>
CommitDate: Thu Feb 11 19:03:45 2010 +1000

    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>
---
 drivers/gpu/drm/radeon/Makefile      |    5 +
 drivers/gpu/drm/radeon/r600.c        |    6 +
 drivers/gpu/drm/radeon/r600_cp.c     |   31 ++
 drivers/gpu/drm/radeon/r600_cs.c     |  826 ++++++++++++++++++++++++++++------
 drivers/gpu/drm/radeon/r600d.h ...
Previous thread: drm/radeon/kms: accept slightly overclocked power modes by Linux Kernel Mailing List on Thursday, March 4, 2010 - 10:00 am. (1 message)

Next thread: regulator: Add notifier event on regulator disable by Linux Kernel Mailing List on Thursday, March 4, 2010 - 10:00 am. (1 message)