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


Reply via email to