X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 1AAC5DC0E11 for ; Thu, 30 Jul 2015 15:03:33 +0000 (UTC) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id C213BDC0080 for ; Thu, 30 Jul 2015 15:03:32 +0000 (UTC) Received: by ioeg141 with SMTP id g141so56619079ioe.3 for ; Thu, 30 Jul 2015 08:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZBqYufkNPzkvFpGi4YMLVTSAuKOVdsS1QSEkLCfOc5Q=; b=hGlH4wMAGAAr7R89n7VTLmLSP2ynRbVbs5Zv7jaepyXUnOAx3AVWtBrcVWLAkEmXPA 0VK36j0JjWhYd+5xC+gwWpuc6P7holA3SRcJyCa0LPDzW4xHKCzsoZ8NDL05ytuaHyFs ddOLAQl7fEuzYoBz6TPHSRa37waEELhSBHkvh/cJ3Fv4+2BWioiNCjNAMV6lRsTaPCQF t7Qb+BAhkzi4liZyFkX/rCgt0L7gMK6Y1dSpF/taYkFrbHSyAoCP4u3Cwwub0bjpiybi hd9lmDv2iqHZC3wqFBUlBnHqoguckbww0UocAc0mZUtWhc2k1gZAXRNAzzC/XNjnUU1h nj8g== X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 X-Received: by 10.107.8.217 with SMTP id h86mr10989082ioi.89.1438268611529; Thu, 30 Jul 2015 08:03:31 -0700 (PDT) Received: by 10.64.81.164 with HTTP; Thu, 30 Jul 2015 08:03:31 -0700 (PDT) In-Reply-To: <20150727120744.4ffdfa0b@ncopa-desktop.alpinelinux.org> References: <20150726103211.3A0FF1025EE9D@r-36.net> <20150727120744.4ffdfa0b@ncopa-desktop.alpinelinux.org> Date: Thu, 30 Jul 2015 11:03:31 -0400 Message-ID: Subject: Re: [alpine-devel] udev replacement in Alpine Linux From: Jude Nelson To: Natanael Copa Cc: alpine-devel@lists.alpinelinux.org Content-Type: multipart/alternative; boundary=001a113f8ef2ae9177051c1901e5 X-Virus-Scanned: ClamAV using ClamSMTP --001a113f8ef2ae9177051c1901e5 Content-Type: text/plain; charset=UTF-8 Hi Natanael, On Mon, Jul 27, 2015 at 6:07 AM, Natanael Copa wrote: > On Sun, 26 Jul 2015 12:10:26 +0200 > Christoph Lohmann <20h@r-36.net> wrote: > > However, using netlink has the drawback that it requires a forever > running daemon, and normally you only need it during bootup, and after > that, you need it seldomly, when you plug in an usb disk, a mouse or > similar. > You may be interested to know that vdevd offers a command-line switch to have it synchronously "patch" /dev and exit. It finds the set of devices that the kernel knows about but are not represented in /dev and creates device nodes and metadata for them, and it removes the set of device nodes and metadata from /dev that are no longer recognized by the kernel. The motivating use-case is to help server admins maintain a /dev that represents the set of available hardware without having to run a hotplug daemon in the background. > I am interested in libudev comaptibility, but have not looked too much > into it. I don't need full ABI compatibility, but it would be very > helpful to make it easy to port current applictions who uses libudev. > In my experience creating vdev, I have found that the key challenge in preserving libudev compatibility happy isn't API or ABI compatibility, but is in generating the data they expect to pull from /run/udev and device events. This is because the metadata in /run/udev and the device packets sent by udev contain considerably more information than is found in the kernel's uevent (for example, data returned by privileged ioctls on devices, data queried from the hardware database, etc.). This information needs to be gathered and propagated to achieve full compatibility--either by the device manager or by some other agent. Unfortunately, the dependence on privileged ioctls precludes most libudev clients from loading the requisite information themselves; a sufficiently privileged program needs to load it and make it available on their behalf. Currently, that role is filled by udevd (and vdevd), but I could imagine an alternative design where libudev-compat proactively gathered and cached such information by periodically running a setuid helper built for the purpose. Thanks, Jude --001a113f8ef2ae9177051c1901e5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Natanael,

On Mon, Jul 27, 2015 at 6:07 AM, Natanael Copa <ncopa@alpi= nelinux.org> wrote:
On Sun,= 26 Jul 2015 12:10:26 +0200
Christoph Lohmann <20h@r-36.net> = wrote:

However, using netlink has the drawback that it requires a forever
running daemon, and normally you only need it during bootup, and after
that, you need it seldomly, when you plug in an usb disk, a mouse or
similar.

You may be interested to know = that vdevd offers a command-line switch to have it synchronously "patc= h" /dev and exit.=C2=A0 It finds the set of devices that the kernel kn= ows about but are not represented in /dev and creates device nodes and meta= data for them, and it removes the set of device nodes and metadata from /de= v that are no longer recognized by the kernel.=C2=A0 The motivating use-cas= e is to help server admins maintain a /dev that represents the set of avail= able hardware without having to run a hotplug daemon in the background.
=C2=A0
I am interested in libudev comaptibility, but have not looked too much
into it. I don't need full ABI compatibility, but it would be very
helpful to make it easy to port current applictions who uses libudev.

In my experience creating vdev, I have found= that the key challenge in preserving libudev compatibility happy isn't= API or ABI compatibility, but is in generating the data they expect to pul= l from /run/udev and device events.=C2=A0 This is because the metadata in /= run/udev and the device packets sent by udev contain considerably more info= rmation than is found in the kernel's uevent (for example, data returne= d by privileged ioctls on devices, data queried from the hardware database,= etc.).=C2=A0 This information needs to be gathered and propagated to achie= ve full compatibility--either by the device manager or by some other agent.= =C2=A0 Unfortunately, the dependence on privileged ioctls precludes most li= budev clients from loading the requisite information themselves; a sufficie= ntly privileged program needs to load it and make it available on their beh= alf.=C2=A0 Currently, that role is filled by udevd (and vdevd), but I could= imagine an alternative design where libudev-compat proactively gathered an= d cached such information by periodically running a setuid helper built for= the purpose.

Thanks,
Jude

--001a113f8ef2ae9177051c1901e5-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---