From sacadmin Wed Sep 24 20:42:06 2008
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8P3g642008579;
	Wed, 24 Sep 2008 20:42:06 -0700 (PDT)
Received: (from dchieu@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id m8P3g68f008575;
	Wed, 24 Sep 2008 20:42:06 -0700 (PDT)
Date: Wed, 24 Sep 2008 20:42:06 -0700 (PDT)
From: David Chieu <dchieu@sac.sfbay.sun.com>
Message-Id: <200809250342.m8P3g68f008575@sac.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Cc: Alan.Coopersmith@sun.com, David.Marx@sun.com, Edward.Shu@sun.com,
        Lingbo.Tang@sun.com, Miao.Chen@sun.com, Phi.Tran@sun.com,
        Randy.Fishel@sun.com, Seth.Goldberg@sun.com, sommerfeld@sun.com
Subject: Amendment to PSARC 2004/151 [PSARC/2008/610 Self Review]
x_sac_archived: PSARC/2004/151
Status: RO
Content-Length: 1781


Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Amendment to PSARC 2004/151
    1.2. Name of Document Author/Supplier:
	 Author:  Edward Shu
    1.3  Date of This Document:
	24 September, 2008
4. Technical Description

4.1. Background/problem:
    Agpgart driver(PSARC 2004/151) can be opened by any non
    privileged application, while privilege check is
    required for it to issue ioctl commands.  AGPIOC_INFO is
    the only one exception among these ioctl commands.  This
    privilege check model used to work well with Xorg prior
    to suspend/resume operations implemented in Solaris x86,
    because Xorg never issued IOCTL commands to agpgart
    driver after it dropped root privilege.  But in the
    resume cycle, Xorg fails on the ioctl command for
    restoring the GART(Graphics Address Remapping Table)
    memory because of the privilege check, which leads to a
    resume failure of Xorg.

    4.2. Proposed Solution:
    We would like to move the privilege check from driver
    ioctl() function to open() function.  By this change,
    privilege check will be required to open the agpgart
    driver.  It implys that applications need
    privilege to issue AGPIOC_INFO command as the same
    as the others.  And Xorg can open the driver with privilege
    check passed and save the file descriptor after.  By
    this, Xorg can issue ioctl commands in the resume cycle
    without privilege check.

    4.3. Bug/RFE Number(s):
        6739533
        6748628

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


