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 E8BCBDC0170 for ; Tue, 12 Jan 2016 20:06:34 +0000 (UTC) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id BFAC6DC0169 for ; Tue, 12 Jan 2016 20:06:34 +0000 (UTC) Received: by mail-ob0-f176.google.com with SMTP id vt7so36651690obb.1 for ; Tue, 12 Jan 2016 12:06:34 -0800 (PST) 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=WHqg0iBbaLfQXW8P+lNpyVt39gXzmpyFbaPdYsN+JIA=; b=sbG03ULzgAlaiX2tw6IcE7k0dRYLy4jVfyCDaRrdLlPnp/PbaPzHQJK8tMoy/DR7MR /azQnH3QFjtXHvxj0P7gJBIV6PkfBXsrGYenJjyGgIni654DzEdTtA0ZjM1KJTv5xdX2 52vCm+adXtaMmvtZ9VS88+dRoOJVcAGkInf4jxJW7MRia5CBvcVfivIpX3CvGTb1VCdr 9mgUcJ52uZhrcc+PPHm8byRucKvUWRYQbu+sUISD6sfFj/UZzt1YKKG4UyO1zQlRcoTc gD9SVShQlVGTgFz6Gb5NdvSnVR1UK4JvmWzy2xHHCCxQq6mmMW2gRCFNsdOlBxzY130N f6/w== 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.60.159.7 with SMTP id wy7mr103947060oeb.71.1452629193225; Tue, 12 Jan 2016 12:06:33 -0800 (PST) Received: by 10.202.81.80 with HTTP; Tue, 12 Jan 2016 12:06:33 -0800 (PST) In-Reply-To: <56953ABE.5090203@skarnet.org> References: <20150727103737.4f95e523@ncopa-desktop.alpinelinux.org> <20150728052436.GC1923@newbook> <20160112153804.GI32545@example.net> <56953ABE.5090203@skarnet.org> Date: Tue, 12 Jan 2016 15:06:33 -0500 Message-ID: Subject: Re: [alpine-devel] udev replacement on Alpine Linux From: Jude Nelson To: Laurent Bercot Cc: alpine-devel@lists.alpinelinux.org Content-Type: multipart/alternative; boundary=047d7bd761b60d7d900529289749 X-Virus-Scanned: ClamAV using ClamSMTP --047d7bd761b60d7d900529289749 Content-Type: text/plain; charset=UTF-8 On Tue, Jan 12, 2016 at 12:41 PM, Laurent Bercot wrote: > On 12/01/2016 16:38, u-ztsd@aetey.se wrote: > >> I would love to get rid of udev but isn't libudev the harder part? >> > > Yes, libudev is definitely the harder part. Handling hotplug > events via netlink is easy, and has been done several times over > already; but libudev introduces policy in software, and most of > the work is providing a compatible interface. > > I have my eyes set on libudev-compat from vdev: > https://github.com/jcnelson/vdev > > but I don't know how much of a drop-in it is, or how production- > ready it is. I'll be asking people around who have experience with it. I've been using vdev and libudev-compat it on my production machine for several months. I use it with heavily with Chromium (YouTube and Google Hangouts work) and udev-enabled Xorg (hotplugged input devices work as expected). My encrypted swap partition's device-mapped nodes and directories show up where they should, and my Android development tools work with my Android phone when I plug it in. I wouldn't say it's ready for prime time just yet, though. In particular, because libudev-compat uses (dev)tmpfs to record and distribute event messages as regular files (under /dev/metadata/udev/events), a program can leak files and directories simply by exiting without shutting down libudev (i.e. failing freeing up the struct udev_device). My plan is to have libudev-compat store its events to a special-purpose FUSE filesystem called eventfs [1] that automatically removes orphaned files and denies all future access to them. Eventfs works in my tests, but I have yet to move over to using it in production. Instead, I've been running a script every now and then that clears out orphaned directories in /dev/metadata/udev/events. -Jude [1] https://github.com/jcnelson/eventfs > -- > Laurent > > > > > --- > Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org > Help: alpine-devel+help@lists.alpinelinux.org > --- > > --047d7bd761b60d7d900529289749 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Jan 12, 2016 at 12:41 PM, Laurent Bercot <= ska-devel@skarne= t.org> wrote:
On 12/01/2016 16:38, = u-ztsd@aetey.se wr= ote:
I would love to get rid of udev but isn't libudev the harder part?

=C2=A0Yes, libudev is definitely the harder part. Handling hotplug
events via netlink is easy, and has been done several times over
already; but libudev introduces policy in software, and most of
the work is providing a compatible interface.

=C2=A0I have my eyes set on libudev-compat from vdev:
=C2=A0https://github.com/jcnelson/vdev

=C2=A0but I don't know how much of a drop-in it is, or how production-<= br> ready it is. I'll be asking people around who have experience with it.<= /blockquote>

I've been using vdev and libudev-compat= it on my production machine for several months.=C2=A0 I use it with heavil= y with Chromium (YouTube and Google Hangouts work) and udev-enabled Xorg (h= otplugged input devices work as expected).=C2=A0 My encrypted swap partitio= n's device-mapped nodes and directories show up where they should, and = my Android development tools work with my Android phone when I plug it in.<= /div>

I wouldn't say it's ready for prime time j= ust yet, though.=C2=A0 In particular, because libudev-compat uses (dev)tmpf= s to record and distribute event messages as regular files (under /dev/meta= data/udev/events), a program can leak files and directories simply by exiti= ng without shutting down libudev (i.e. failing freeing up the struct udev_d= evice).=C2=A0 My plan is to have libudev-compat store its events to a speci= al-purpose FUSE filesystem called eventfs [1] that automatically removes or= phaned files and denies all future access to them.=C2=A0 Eventfs works in m= y tests, but I have yet to move over to using it in production.=C2=A0 Inste= ad, I've been running a script every now and then that clears out orpha= ned directories in /dev/metadata/udev/events.

-Jud= e



--
=C2=A0Laurent




---
Unsubscribe:=C2=A0 alpine-devel+unsubscribe@lists.alpinelinux.or= g
Help:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0alpine-devel+help@lists.alpineli= nux.org
---


--047d7bd761b60d7d900529289749-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---