Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3418382imu; Mon, 24 Dec 2018 01:20:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN7LwPmYfV3YhJ1sthSyjw5qPuwy/ScCRv6Ge59seO2bA+yz0P+9+zUfljb/RpvABqt2ZfT1 X-Received: by 2002:a62:1e45:: with SMTP id e66mr12381715pfe.152.1545643210398; Mon, 24 Dec 2018 01:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545643210; cv=none; d=google.com; s=arc-20160816; b=syJysIceyr6VonSQVYNGYm8XkimBpInXe2UjOHFxHvSTVVQ85bvuFfhesY75WubsL8 3YOv/A3IVyRanh4SHzCHaMCqEHpihim8gaT5mi4RJLMBFVP7c6zzZW/87XDbsH0r/3jD cqLkUHd1B/TbKRQF03BWON0OHBCabns8l/W0d9zjOAJIRijiqJFo6Ch0/l0KR6uu2pza XUwTjBcakz1hqg5hwPiC+UZhnRnqg0pH4gegJigvT+UEnABXWqb/cv1k+ty6sEmUtbpU JtmYay/Wx9tiXpvOCJ8LYqvHnNuN3uEd9dHroBMobJ9uUfOv5DY+blPHfJ/sV+z0iwNj 6j4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rNXd2KUfL3/FLaqpz0NMeGk919yij6J2VNJCCgXUtiM=; b=0dyQGlr9E7CdQxWr0pmNC5EOGb0w0GDV02Q5qp25CecympKqAnPF4XGE5MAA720/ei hthpHxljyURmL+Z9BopNLcOZnX/Sr4EPKblxK1Ikvu4aqlc4/m1ILcrmgXbC1MlkA2DL EL4Zs9e8k/PBgWt/XMul9BBRkba9wCdyzGAAQArybTmRKOMgsNkca6tFv74TvYDM4oSs F+5UBtQKyj9DuK7ZY+PYXZA7NfZUsF4QntyDasKHFRj/zrGmb88wF/5nshqiZKV2JxZE 7g+1ZDAaP6RcgYXe5kFlWTsMnQ+iDEHUHSRUGuBWfUj1sWGEdv9/5WWmYgtIP/KuXx3E XLsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DdXWZzDD; 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 e21si27443996pgg.571.2018.12.24.01.19.54; Mon, 24 Dec 2018 01:20:10 -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=DdXWZzDD; 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 S1725814AbeLXJRu (ORCPT + 99 others); Mon, 24 Dec 2018 04:17:50 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:44474 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbeLXJRt (ORCPT ); Mon, 24 Dec 2018 04:17:49 -0500 Received: by mail-pg1-f196.google.com with SMTP id t13so5378793pgr.11 for ; Mon, 24 Dec 2018 01:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rNXd2KUfL3/FLaqpz0NMeGk919yij6J2VNJCCgXUtiM=; b=DdXWZzDDCCapuOb2wx+mQdz+H9cEZ/8NRLrHQLkLj4Oz3vuTDgQKyxUshCNTWHvH6o v9QoYp+XMtkYDe6SmJuEs5O2ZfhdGpCIbcrEVj+k0PKUTUEgOEbb7ZgskvKHtFAl/5Bb scDd1MXRfHOiffEyct2vLpa/+fHB5uqTm4dFbFlZ8Smcii4iedX+BLxhW6GsMdHgt0dW yKAuCIvPUWOW6AuMnoKiV4eIIH51bRMeTwq37MpF2vnrwisE2H7dpRuW5MlE6ATBx9r4 SO+8DIpJhrfDuIAAWne81bdyJHzNfIkTwA/ArbAxiSHSxyPJZhOx1RcS3kFMuK+pxZ7n o3yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rNXd2KUfL3/FLaqpz0NMeGk919yij6J2VNJCCgXUtiM=; b=MH1FK/hYE+QH/46n14stXJZeN03BNctW6w3/DruP8WIl06dKYKdfrvoKV10N6nyLUH 22ntnftW19z0zmtI3W4zGiAxW1GCCGbrKkfsWUqh+ybyhfw+z7DEgHOMANvIRyq0YvPn ekNHxe7Ea4HUTkcBj8wpvTp1aOnVJSwxUyTRfE3eq4M96zaaz8dVQmPgI+tTFH5Q5vcC 89uNEljNwDn11TSj8UUJ8U+Zj8JZwE8hv689ZjeJJc893LKYdDOAlWVLX7LG6V1i69IK oGr0fLnwgMq46Cy24s+D0KKW2TqC2z/D82DwWEhcZpO33Vs6b6bj+80KHFUxZNvHGnc2 TzWQ== X-Gm-Message-State: AJcUuken7YIG8jiVLW8vJlmuheWd1OVfz9L5dfvKJkrnPW8svG7ApaMm Ep+Q+BBupfRHuKrzQh4vbZwOFRON X-Received: by 2002:a63:df50:: with SMTP id h16mr11839830pgj.421.1545643067080; Mon, 24 Dec 2018 01:17:47 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id b27sm43628149pfh.113.2018.12.24.01.17.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Dec 2018 01:17:46 -0800 (PST) Date: Mon, 24 Dec 2018 01:17:44 -0800 From: Dmitry Torokhov To: Gabriel C Cc: Christian Brauner , Marcus Meissner , LKML , Greg KH , Linus Torvalds Subject: Re: FYI: Userland breakage caused by udev bind commit Message-ID: <20181224091744.GA122208@dtor-ws> References: <20181223164954.hib4lbchftspidsd@suse.de> <20181223171703.s7jm6fkyosnsf33z@brauner.io> <20181223180609.GA102606@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > > > > > > > > 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. Thanks. -- Dmitry