Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3347995imu; Sun, 23 Dec 2018 23:33:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/VhFdY0C+wEQbVj3qSGqoaLp14LBClMLtAdJhoAhKZDp34+mZOmv3XwbQBJFJWEzENaOXC5 X-Received: by 2002:a62:2606:: with SMTP id m6mr11958120pfm.133.1545636781257; Sun, 23 Dec 2018 23:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545636781; cv=none; d=google.com; s=arc-20160816; b=Kkxby2KsxxbT6CQ1MxpJbpr2HQay8ShNO3eAVCGHlra6kCJbVj2tEpxJJ2uyLoZ2yT mOauxWfLGwO0FRtT1mGX50+fo2HIQieGz9XyuL5xAgLnXhAzYIwD8eDS1UGRsnl0BRMV zK05IBUmCy/M7wJ12h6KV8FfmDCIk0WQ9xSiKnAsSAF7Z2uqvJimb658koQzVzPefK08 LpLFwUgSVprM/TOLVZWoYepdUjvMaTz0jy7Vh96CSiPagi8qnpa6W9cl0RovnpIQQ6G6 YR7d68aXwLxZTFLmJ73qgETJNQYp2RnuHSsHDYOoBFZBUXaqDNtyu/+kqUKyGUp/Lodf UgJQ== 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=PcDgWrVperDuh/6LtlD9XASVIbwq6WBNGAnnxvH7T8Y=; b=0HgeCOSXHtO0RbRMognlp4A3rrHFaEFbEWVoJz2iJtquI/veYZG+9LEC/ZFp21/fY/ lmaBWw9LlRU6oymPO8UPU+hah6jDY9TTXfmVRscS9w5u9gFIR28q0kSCAnAoMaGlhown RdQjhln3Ffs5pL4b9TZPZgbDWvyFQrZz2fJfjsc6msc5I47NXwJqXJF1qR590FKdiCv8 bG1pcj15qdsLuoEluFIx1qH/PIKUHJcuQvHmil+ylLuCOs3q72Wfw5tDgrc1eElNBeKX aZqe38MrbfIrnvct9H7qN6rn9PMEgow20qHI4QlLGRxL8VjVTSHGEBHs9RNNpWTuIzF2 fdJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SaW8vM6d; 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 142si28385495pfy.217.2018.12.23.23.32.44; Sun, 23 Dec 2018 23:33:01 -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=SaW8vM6d; 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 S1726737AbeLXHb4 (ORCPT + 99 others); Mon, 24 Dec 2018 02:31:56 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37581 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbeLXHb4 (ORCPT ); Mon, 24 Dec 2018 02:31:56 -0500 Received: by mail-lj1-f194.google.com with SMTP id t18-v6so9711228ljd.4 for ; Sun, 23 Dec 2018 23:31:54 -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=PcDgWrVperDuh/6LtlD9XASVIbwq6WBNGAnnxvH7T8Y=; b=SaW8vM6dQQAL90tpa804qY8di+vxLfqW3gxnRU2T45Xv3j1upZZHf7ljUOfAtuvXHt uOJOI2ODa6remaKYWKqFY96JbCPNuE7l53whb1QQ1AP+tOzYHtm+1kGYGpDpX8AFYmpz BbzqB1GjUaHCGYwm5psmf+muKXu4w5csKyzZytjHU1OlzPoDUfKkoYfl09mimU0bAuz5 VuUtE66rMVOziJ+pmrRDWSJy0YGXzItH/QkMco0djIhdFvhSliGlbSGkWJSGfZEKZhRk E8YsN3VASiuTLXpFGl+6NxMO1o/XMWwxJBVqNJlCWdxw4nYl7ukWjDbaMLpUIwIWHTUs IHcA== 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=PcDgWrVperDuh/6LtlD9XASVIbwq6WBNGAnnxvH7T8Y=; b=q8bwuIWtFlxXXjnxNEgmSfw5R+9QrCYBxBr38Yo6Hv0XkovJTkxrJ5h37imG1/24pG OgqWNwc+bnbcPUFrZYiJ/fv0Z58xRaSJfkNbAVioNVO8bMi7riHW5NkrStBY4Ql+CXJl cRTANV3uNXHVtNgJY0P9m9RHsC7n7Hu0d7Q8xCp2gkSy8aCEEO0uzY8x3dJ8S6n5ACHU WW1pLHuEpN/A61CUxcoPxh1JWRoJgjCwDHMeqE2b2jBvovJ9H0fmhZ5pSPaRvJe2A+Ib FUz96edhkLMreqzT8n5YI7YXydSSdK9xRWKH0T0uFZ5FjStHkDnNxM62jx5lC38Td3eh Wy3g== X-Gm-Message-State: AJcUuker1aoL9tdPxodbtGBv9VuC9TSQaETfkf2lRq4WszxuS8gQnhIy iN9Osn093MjRwOc8H9+g1fw9agIBgdU3/xjQ/Q== X-Received: by 2002:a2e:88cf:: with SMTP id a15-v6mr6634679ljk.76.1545636713708; Sun, 23 Dec 2018 23:31:53 -0800 (PST) MIME-Version: 1.0 References: <20181223164954.hib4lbchftspidsd@suse.de> <20181223171703.s7jm6fkyosnsf33z@brauner.io> <20181223180609.GA102606@dtor-ws> In-Reply-To: <20181223180609.GA102606@dtor-ws> From: Gabriel C Date: Mon, 24 Dec 2018 08:31:27 +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 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 ? > > > > > > 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. > > Still it is unfortunate that we did nit notice that my patch enabling > this functionality in systemd was premature. > > Thanks. > > -- > Dmitry BR, Gabriel