Re: [PATCH 06/13] sg_io: whitelist a few more commands for multimedia devices

Tejun Heo
2013-01-25T18:13:34Z

Hey, Paolo.

On Fri, Jan 25, 2013 at 06:57:20PM +0100, Paolo Bonzini wrote:
> And because someone _will_ use it from my point of view, I can only give
> justification to leave stuff _out_. In general I did so if the command
> can disrupt someone else, as would be the case for persistent
> reservations. It was not really always respected for the existing
> table, for example I'd have left out LOG SELECT, but the series is
> already controversial enough, so one thing at a time.

I'm not sure how well I can explain this but something being in the
spec and something in wide use are two different things, and people,
including the ones in hw vendors, tend not to pay too much attention /
resources to stuff which aren't used widely and commands which aren't
in wide use are much more likely to have errors in their
implementation or be abused - e.g. overridden for vendor specific
command as part of weird init sequence to select device mode or
whatnot.

Another aspect is that sometimes opcodes are recycled and people of
course don't try to recycle opcodes which are in wide use. They
choose the ones which failed to gain much traction and became
obsolete. The recycled command might not be suitable for exposing to
userland.

So, there are actual costs coming from exposing them, which is fine if
the benefit can offset them enough, but what would be the benefit of
exposing commands which aren't being used? The only thing I can think
of is that of avoiding the annoyance of expanding the list later?
But, as you said, exposing commands by default mean that we're more
likely to need blacklists in the future, so that doesn't seem like
that much of winning to me. Discovering use cases is actually much
easier than finding broken devices for some obscure commands.

> > and can you please stop labeling reviews as "useless"?
>
> Reviews are not useless, but championing the inclusion of two obsolete
> commands in a list is not a good use of bandwidth. Because the choice
> is arbitrary, the discussion can degenerate too easily into repeatedly
> saying the same thing over and over. All I'm trying to do is avoid it.

Seems like I was too twitchy. My apologies.

Thanks.

--
tejun