Re: [PATCH 2/2] devscgroup: make white list more compact in somecases

From: Serge E. Hallyn
Date: Thu Jun 05 2008 - 15:17:32 EST


Quoting Serge E. Hallyn (serue@xxxxxxxxxx):
> Quoting Pavel Emelyanov (xemul@xxxxxxxxxx):
> > Consider you added a 'c foo:bar r' permission to some cgroup and then
> > (a bit later) 'c'foo:bar w' for it. After this you'll see a
> > c foo:bar r
> > c foo:bar w
> > lines in a devices.list file.
> >
> > Another example - consider you added 10 'c foo:bar r' permissions to
> > some cgroup (e.g. by mistake). After this you'll see 10
> > c foo:bar r
> > lines in a list file.
> >
> > This is weird. This situation also has one more annoying consequence.
> > Having many items in a white list makes permissions checking slower,
> > sine it has to walk a longer list.
> >
> > The proposal is to merge permissions for items, that correspond to the
> > same device.
> >
> > Signed-off-by: Pavel Emelyanov <xemul@xxxxxxxxxx>
>
> Acked-by: Serge Hallyn <serue@xxxxxxxxxx>
>
> Thanks. I suppose if it was deemed worth it, the other thing you could
> do would be to detect when you have a rule
>
> c foo:bar r
>
> and you add a rule
>
> c foo:(all) r

But a private email response preferred the each-entry-is-separate
semantics, so I retract that suggestion.

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/