[illumos-Developer] [REVIEW] 260 some drivers erroneously discount a major of 0

Gordon Ross gordon.w.ross at gmail.com
Thu Sep 30 18:52:16 PDT 2010


Looks fine to me.

I wonder if there is any reasonable way on an existing system to move
whatever driver might be using major zero to some other major number?
If so, you could skip the 2nd and 3rd file changes.

On Tue, Sep 28, 2010 at 1:36 AM, Richard Lowe <richlowe at richlowe.net> wrote:
>
> I'd like review of:
>   260 some drivers erroneously discount a major of 0
>
> webrev: http://richlowe.net/webrevs/il-maj0/
>
> This bug is the same as:
>  6975280 t_kopen() fails if transport major device = 0
>
> As noted in the bug (#260), the change to add_drv prevents major 0 being
> given to drivers (it means, for new images, major numbers will start
> from 1), this is due to the impossibility of auditing every driver for
> assumptions regarding (dev_t)0 (especially those from 3rd parties), and
> the apparently fairly widespread assumption that such a dev_t is
> invalid.  The only code I found with such assumptions is t_kopen, and in
> addition sv, as mentioned in the bug.
>
> I've tested this via add_drv -b, with an empty name_to_major, to verify
> that the first driver it adds gets major 1, with a partially complete
> name_to_major, to make sure that the 'gap' at 0 is not filled, and by
> wiring tcp(7D) to major 0 to test the circumstances mentioned in 6975280
> (both before and after).
>
> I have not yet found a good way to test 'sv', though the change seems
> obvious I'm entirely willing to (and would prefer to) revert it, unless
> a volunteer can come up with a reasonable way to test it.  You would
> need the device underlying sv to have both a major and minor number of
> 0.
>
> Garrett has already looked at this, and given some general sense of
> assent.
>
> If you plan to look at this but require more time, please say so,
> so that I know to wait for you.
>
> -- Rich
>
> _______________________________________________
> Developer mailing list
> Developer at lists.illumos.org
> http://lists.illumos.org/m/listinfo/developer
>



More information about the Developer mailing list