Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3467584imu; Mon, 24 Dec 2018 02:31:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN6TOus8ka2r0HJsAwvYVlrzRmZlalms1QK+H1A2njGivKqCl9AYBZhz9TCECnxgJyTbmsw6 X-Received: by 2002:a17:902:6b0c:: with SMTP id o12mr12679018plk.291.1545647499322; Mon, 24 Dec 2018 02:31:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545647499; cv=none; d=google.com; s=arc-20160816; b=JccB2ZLrcrwfY3TJycmpzuOto+cPTkZoWsgF/uVkOtyewfSwu8psWxlTyc0JuPsoia +cZN3qzqFu4YEb865AvhCzPDI+EnAUYnBpYzNCHFVSMBDIkDmCA49oUxZ2QIVQuCQFMV BL4K0Cr9Q/3bCM82kmzlUYVOyTYX1H3BEZgIku+MsbuO47uwh/PLZifScOjNkAoK/Dod 2msJ10LDr0tpkxOvq3qrFvZ9OtRu3ozDZN/HNbHkXlKqeWi7lFKPppa9MrHX5F5FBNj/ vDcDlht7YwIBOzJDLQfOt0rIU25wkVscOImcW/GhYVPVOWsGBvmfllC/hUs2GDatzo1J chtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=omvQueclVbBSPEs+Ql9P/pz9M/zrssliLVwlGqm31QQ=; b=IqdSkIcnV6+spgHlteCrov7U0xiKBpSLk3uRTikwyIfPC+ljrl8tU4oU6m3PF2fW7d BoaUxpbP2VIt8cOIM9SXELxXNYJL7U/I2n/8zWSzLIZ5MizUGqPRXiXlvoJzSUA8kOJe zkmI07q2+oH1nzGkAZZin/Wlfq4B+00xUeaeai7HOoOnaIAUs8A3SwdGn3zeQAKVm19/ TQqLdCQhnCr1zzBnZxJINzcWekmAN4xd/fk1BJLcIU2j7vjMEktgzbO0jHzQQLScWlf/ ddQ16v7PKXDZJN6XcN94ZphncmUCsOOTwZMNjwGiWUeOUMOaqySheJ38QWPfIweEOeZ6 fwKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="hW9+/o51"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d36si6571720pla.216.2018.12.24.02.31.23; Mon, 24 Dec 2018 02:31:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="hW9+/o51"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725763AbeLXKad (ORCPT + 99 others); Mon, 24 Dec 2018 05:30:33 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:32914 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbeLXKad (ORCPT ); Mon, 24 Dec 2018 05:30:33 -0500 Received: by mail-lj1-f195.google.com with SMTP id v1-v6so10068380ljd.0 for ; Mon, 24 Dec 2018 02:30:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=omvQueclVbBSPEs+Ql9P/pz9M/zrssliLVwlGqm31QQ=; b=hW9+/o51mRvJWnP8GngMxFVZ14re72dz2rIuGrh6k9f/eeJ7n1l4/gStfMNdRx6ww3 vmRxSIXXj0xvwVhq0263VwNhPLMybyJcxsqAPYS36CXn0cxIl6egzSD3Zeb9vJdEnZ1f yARbUzUX5S3eSLE5Hzczr66jyB40zOlOZC2mCYBgD+qfjpwWx9hkmmyofehZXufE3nNc IN3jwkNX6g+ZrRu0SYrPkvZShwUjuNPPWB3sJWm1av0v2/w9Zk/ioko56LP76WMXEAK9 OBRyYeAqPl8uGIoJxiiBO2K0kaqa2sLN1/eXUumcDPSHx676Uu613NakKeVWl/H+zWBY /Dww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=omvQueclVbBSPEs+Ql9P/pz9M/zrssliLVwlGqm31QQ=; b=iZMVQhU+nSzIdezEb3tWe/bUqW/bux1zVXWhTjG5VlkGo1Rfp9tRq1XXTHbRatD5bF kxJT6b1aYe7yQi2wj8uZS7WlQ6wxhMISEGXCy9FGOAUtavrnGm1iesKxhHbkWvPrvGHq ri4cKtewjkXnc3GK5o9n0upSySWjrpT9xzh0C/USWgXR9sCF1vBLLFk/HMbF1t+ZZbBI /af6ZkrDAt4NBoNq1pvLS82460I0t+dTarQyWhz1j52DATn6P19BxUcIcPcNYXadTC0Z vxA7AFcCr1AAfN/J9gokj2JSoH0c4zJ/zTcgAHSlCx2qRyq73Ep4hkKf4QPg8EyeXWLK NEGg== X-Gm-Message-State: AJcUukcZlEJforoPT+UYy/F/R1sntJ2BY32UrtgzN7jUj56yHTdDJtqH QxDyOUmI4YmGhrX+CAqUW7YrOTjBVF8jWOyHVA== X-Received: by 2002:a2e:2d4:: with SMTP id y81-v6mr7191015lje.62.1545647430414; Mon, 24 Dec 2018 02:30:30 -0800 (PST) MIME-Version: 1.0 References: <20181223164954.hib4lbchftspidsd@suse.de> <20181223171703.s7jm6fkyosnsf33z@brauner.io> <20181223180609.GA102606@dtor-ws> <20181224091744.GA122208@dtor-ws> In-Reply-To: <20181224091744.GA122208@dtor-ws> From: Gabriel C Date: Mon, 24 Dec 2018 11:30:04 +0100 Message-ID: Subject: Re: FYI: Userland breakage caused by udev bind commit To: Dmitry Torokhov Cc: Christian Brauner , Marcus Meissner , LKML , Greg KH , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mo., 24. Dez. 2018 um 10:17 Uhr schrieb Dmitry Torokhov : > > On Mon, Dec 24, 2018 at 08:31:27AM +0100, Gabriel C wrote: > > Am So., 23. Dez. 2018 um 19:09 Uhr schrieb Dmitry Torokhov > > : > > > > [ also added Linus to CC on that one too ] > > > > > > On Sun, Dec 23, 2018 at 06:17:04PM +0100, Christian Brauner wrote: > > > > On Sun, Dec 23, 2018 at 05:49:54PM +0100, Marcus Meissner wrote: > > > > > Hi, > > > > > > > > > > I am the maintainer of libmtp and libgphoto2 > > > > > > > > > > Some months ago I was made aware of this bug: > > > > > https://bugs.kde.org/show_bug.cgi?id=387454 > > > > > > > > > > This was fallout identified to come from this kernel commit: > > > > > > > > > > commit 1455cf8dbfd06aa7651dcfccbadb7a093944ca65 > > > > > Author: Dmitry Torokhov > > > > > Date: Wed Jul 19 17:24:30 2017 -0700 > > > > > > > > Fwiw, the addition of {un}bind events has caused issues for > > > > systemd-udevd as well and is tracked here: > > > > https://github.com/systemd/systemd/issues/7587 > > > > I haven't been aware of this until yesterday and it seems that so far > > > > this hasn't been brought up on lkml until you did now. > > > > > > The fallout was caused by premature enabling of the new events in > > > systemd/udev by yours truly (even though the commit has Lennart's name > > > on it due to how it was merged): > > > > > > https://github.com/systemd/systemd/commit/9a39e1ce314d1a6f8a754f6dab040019239666a9 > > > > > > "Add handling for bind/unbind actions (#6720) > > > > > > Newer kernels will emit uevents with "bind" and "unbind" actions. These > > > uevents will be issued when driver is bound to or unbound from a device. > > > "Bind" events are helpful when device requires a firmware to operate > > > properly, and driver is unable to create a child device before firmware > > > is properly loaded. > > > > > > For some reason systemd validates actions and drops the ones it does not > > > know, instead of passing them on through as old udev did, so we need to > > > explicitly teach it about them." > > > > > > Similarly it is now papered over in systemd/udev until we make it > > > properly handle new events: > > > > > > https://github.com/systemd/systemd/commit/56c886dc7ed5b2bb0882ba85136f4070545bfc1b > > > > > > "sd-device: ignore bind/unbind events for now > > > > > > Until systemd/udev are ready for the new events and do not flush entire > > > device state on each new event received, we should ignore them." > > > > > > > And how about peoples still uses systemd < 235 and newer kernels ? > > Should work exactly as it was with older kernels as it ignores > bind/unbind attributes. > It does not .. you can reproduce with an systemd/udev< 235 , eudev etc just easy. Just follow this bug report. > > > > > > > > > > > > If distributions would be using libmtp and libgphoto2 udev rules > > > > > that just triggered on "add" events, and not the new "bind" events, > > > > > the missing "attribute tagging" of the "bind" events would confused the > > > > > KDE Solid device detection and make the devices no longer detected. > > > > > > > > > > This did not affect distributions that rely on the newer "hwdb" > > > > > device detection method. > > > > > > > > > > I have released fixed libmtp and libgphoto2 versions in November, so > > > > > this is under control, but wanted to bring this up as a "kernel caused > > > > > userland breakage". > > > > > > Given that we explicitly enabled these new events in systemd/udev code > > > this is actually "userspace caused userspace breakage" case. > > > > I really do not agree with you here .. Is kernel -> userspace breakage > > and while userspace is trying to workaround even much more breaks. > > > > Not sure I follow your logic. We enabled handling new events in > systemd/udev. This thing broke systemd/udev. We now disabled this new > thing in systemd/udev. You enabled in 235 and disabled in 240. That just means all versions but 240 are broken. No ? And like I've wrote in my other elmail fixing just udev in systemd is not enough. We have some other udev implementations flying around. Also we have whole setups depending on udev , expecting the rules to work right way. > > Thanks. > > -- > Dmitry BR, Gabriel