From gd78059@sac.sfbay.sun.com Wed May 28 14:43:09 2008
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m4SLh8K1024040
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 28 May 2008 14:43:08 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id m4SLgw9s014532;
	Thu, 29 May 2008 05:43:07 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K1L00903LNUWQ00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 28 May 2008 14:43:06 -0700 (PDT)
Received: from dm-sfbay-01.sfbay.sun.com ([129.145.155.118])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K1L00M61LNU0190@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 28 May 2008 14:43:06 -0700 (PDT)
Received: from sac.sfbay.sun.com (new-sac.SFBay.Sun.COM [129.146.175.65])
 by dm-sfbay-01.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id m4SLh6Mw036714; Wed, 28 May 2008 14:43:06 -0700 (PDT)
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 m4SLh4lI024035; Wed,
 28 May 2008 14:43:04 -0700 (PDT)
Received: (from gd78059@localhost)
 by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id m4SLh4Rc024031; Wed,
 28 May 2008 14:43:04 -0700 (PDT)
Date: Wed, 28 May 2008 14:43:04 -0700 (PDT)
From: "Garrett D'Amore - sun microsystems" <gd78059@sac.sfbay.sun.com>
Subject: Widening IOCPARM_MASK [PSARC/2008/348 FastTrack timeout 06/04/2008]
To: PSARC-ext@sun.com
Cc: Garrett.Damore@sun.com
Message-id: <200805282143.m4SLh4Rc024031@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 2291

I'm sending this on my own behalf.  Relatively straight-forward case to
increase the width of IOCPARM_MASK.   Patch binding is requested, as it should
be backwards compatible, although I have no plans to backport.

Template Version: @(#)sac_nextcase 1.66 04/17/08 SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Widening IOCPARM_MASK
    1.2. Name of Document Author/Supplier:
	 Author:  Garrett D'Amore
    1.3  Date of This Document:
	28 May, 2008
4. Technical Description
Widening IOCPARM_MASK
---------------------

Requested binding: Patch

Problem:

The macros in sys/ioccom.h for ioctl cmd encoding of parameters are
too short for many kind of ioctls which could otherwise make use of them.
In particular, the value of IOCPARM_MASK is only 0xff, allowing only fo
parameters up to 255 bytes to be encoded in this format.  

As an example, the OSS software from 4Front has to supply its own replacement
macros because the Solaris ones are inadequate.  As a result, commands like
truss(1M) cannot decode OSS ioctls properly.

Solution:

We propose to widen the bitmask of IOCPARM_MASK to 0x1fff (13 bits), allowing
for parameters up to 8191 bytes to be encoded.

Competitive Analysis:

Other operating systems use much larger values for IOCPARM_MASK.  For example,
NetBSD and FreeBSD use 0x1fff (13 bits), and Linux, which does not use
IOCPARM_MASK, but instead uses its own _IOC_SIZEBITS macro to set the sizes,
uses a 14-bit wide field in constructing parameter sizes for
_IOR, _IOW, and _IOWR.

Compatibility Notes & Impact:

The change as described will impact very little software.  Perl will have an
increased ability to handle such ioctls (by guaranteeing that enough space
is allocated for encoded parameters), and truss will be able to properly
report parameter sizes associated with such ioctls.  If older binaries of
perl and truss are used, they will simply function the same as they do today --
ioctls with parameter sizes less than 255 bytes will be reported/handled
properly, and ioctls with larger paramters will not.


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


From gdamore@sun.com Wed Jun  4 11:55:59 2008
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m54ItwGT010060
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 4 Jun 2008 11:55:59 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m54Itsxk015044
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 4 Jun 2008 19:55:58 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K1Y00E0DCL72L00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 04 Jun 2008 11:55:55 -0700 (PDT)
Received: from sca-es-mail-2.sun.com ([192.18.43.133])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K1Y00C6VCL71C60@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 04 Jun 2008 11:55:55 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m54IttUs010750	for
 <PSARC-ext@sun.com>; Wed, 04 Jun 2008 11:55:55 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0K1Y00001C0JUH00@fe-sfbay-09.sun.com> (original mail from gdamore@sun.com)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 04 Jun 2008 11:55:55 -0700 (PDT)
Received: from [192.168.251.106] ([76.174.83.55])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0K1Y00K1LCL3IV00@fe-sfbay-09.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 04 Jun 2008 11:55:51 -0700 (PDT)
Date: Wed, 04 Jun 2008 11:55:23 -0700
From: "Garrett D'Amore" <gdamore@sun.com>
Subject: 2008/348  Widening IOCPARM_MASK
Sender: Garrett.Damore@sun.com
To: PSARC-ext <PSARC-ext@sun.com>
Message-id: <4846E51B.7070004@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
User-Agent: Thunderbird 2.0.0.6 (X11/20071023)
Status: RO
Content-Length: 55

This case was approved at PSARC today.

    -- Garrett

