Hal and Xorg output devices

Ely Levy elylevy-xserver at cs.huji.ac.il
Sat Feb 26 14:45:19 PST 2005


On Fri, 25 Feb 2005, Jon Smirl wrote:

> On Fri, 25 Feb 2005 14:30:23 +0200 (IST), Ely Levy
> <elylevy-xserver at cs.huji.ac.il> wrote:
> > So we agree on the model just that you say hal should use sysfs on linux
> > to see what the modes are instead of libddc?
> > I just don't see why that code needs to be in the kernel, after all you
> > don't need to be in kernel mode to access that information, and with linux
> > moving device handling to user level with hotplug and udev it only makes
> > sense to get the info in that way.
> > as for pci info libpci is done by kernel people and probebly already knows
> > how to find all that informaiton, I think kernel drivers should be kept as
> > simple as possible as they are very not portable and a lot harder to
> > debug.
>
> Doing these things in user space requires root priv. The XGL server is
> being designed to run without needing to be root. The basic idea is to
> minimize the code that needs to be inspected for security holes. It is
> much easier to inspect device drivers than the entire X server.

I guess you are right mounting the card memory would require root..

> On monitor change these events happen:
> 1) a hardware interrupt is generated.
ok
> 2) device driver turns this into a hotplug event
fine

> 3) hotplug event runs a tiny user space app at root priv that reads
Hal can do that.
> the DDC and generates the mode list. This app can use a file in /etc
> to supress modes or add new ones to compensate for broken EDID.
We should do that automaticly as well.

> 4) The valid mode list is set back into the driver at root priv
Hal can do that as well.

> 5) A dbus event is generated
>
> At user priv:
> dbus event is received
> mode list is read and a new mode is set
>
> In this scheme the X server process does not need to run with root priv.

Yea agreed.

> Parallel arguements exist for why X should not enumerate the PCI bus
> from user space. The kernel instead provides a hotplug safe way to
> find devices via sysfs that doesn't need root priv.

We have only one problem then, how to make that portable for system which
doesn't have sysfs (and please no I don't care about anything by linux:)

> --
> Jon Smirl
> jonsmirl at gmail.com
>

Ely



More information about the xorg mailing list