Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp259402pxu; Wed, 7 Oct 2020 02:16:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBuS/oLo8as5yzIAUX/HPOmOBDkuECvhdGa67wGu8uJJz8G3odnpNge/PEmt85i5Fo+oem X-Received: by 2002:a17:906:ad94:: with SMTP id la20mr2277658ejb.522.1602062170979; Wed, 07 Oct 2020 02:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602062170; cv=none; d=google.com; s=arc-20160816; b=SougpAQvJ8w70+7edxLMkYEjEHnDSRgkYT/6H2d1wCtuU1kGEMMrhGANH8Z+I3L0qF CHhCT/Ukd0z1ipqaS0KJ2q2xRYGULyt981AGLbM2oXcAyNogaAb1fDS3fNtZE1Xyl3yP FHE8duO5vlXfQXUllpkAo/xUiaF6WPS0Y87Q7RYk1bDB15nNBUZi7FV+JXijUrs/UfWn QvYpEg8gnwDBe7wqznP8WajZQNtl3JLQPDEF6uGsoNXyTPkXwEoZbEB+B1daZRMqL0AM Pcya9rCyalItxaGwHG1mg4nH7KDi1vvTxYNC+1lKTzRzgqZ1xHyCH7OK5tGug7UjNeSB YIxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NyUwzWK2CoLf4Rh2eOMeGHlvffFZRX9uXmUWq6ecHfs=; b=0RTvAVwrwI37hBFHPSE2IHVloklCLJ27tGUJU9urQK5g8iuCQDl000gHjgvIVeHv6B G+qxj89NtDYPC0jrv+tXiwbU5iTyCFsK15JWiDwBL1yjUcI3DWD9uYrBhHbVnfRgUBoR 3x5y0sguYvNUeFvqyjc0LTkqr1JH1jRN6w583CHqgzlUz9D0KRsbpXg/WgjPJ+Q6Gh+Z KyuowDazepnbL1wy81uT18CAYNnZfWYBboeM5iE5kz5nr4wKI4L4Wokhc5ljSZ9MZzPq wUHmm5Yz/VzANJTStbS7K4Euf/Q8zN4eNWcyd5SdYvGCGnFv3w7xcDV/umJZbr/VkKXP 5PjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EyrmmIME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si965600ejc.653.2020.10.07.02.15.47; Wed, 07 Oct 2020 02:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EyrmmIME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbgJGJMl (ORCPT + 99 others); Wed, 7 Oct 2020 05:12:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:50516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbgJGJMk (ORCPT ); Wed, 7 Oct 2020 05:12:40 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C0FFF204EC; Wed, 7 Oct 2020 09:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602061960; bh=GGf3v+keEJl27fl/reXppAsR7VWyzAcjRjLjHR8aKhk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EyrmmIMEHS8nKj4+hHnrFi7/ht0wmdlNWzy2ijninxCkJewmjZ/iULg60WcIW5ah5 yrGJ8/3H2nJ2EdPA3BKyHAJqFg3+6lN2L7X0pgNX4Wskvemqsu8pWq4f8pCj7Zd2Jr S8vfkVlb86Aj/Pg9iZ2YW+YXCyATor6AVJN49pHQ= Date: Wed, 7 Oct 2020 11:13:24 +0200 From: Greg Kroah-Hartman To: "M. Vefa Bicakci" Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bastien Nocera , Valentina Manea , Shuah Khan , Alan Stern , syzkaller@googlegroups.com, Andrey Konovalov , Shuah Khan Subject: Re: [PATCH 5.8 05/85] Revert "usbip: Implement a match function to fix usbip" Message-ID: <20201007091324.GF614379@kroah.com> References: <20201005142114.732094228@linuxfoundation.org> <20201005142115.000911358@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 06, 2020 at 04:26:27PM +0300, M. Vefa Bicakci wrote: > On 05/10/2020 18.26, Greg Kroah-Hartman wrote: > > From: M. Vefa Bicakci > > > > commit d6407613c1e2ef90213dee388aa16b6e1bd08cbc upstream. > > > > This commit reverts commit 7a2f2974f265 ("usbip: Implement a match > > function to fix usbip"). > > > > In summary, commit d5643d2249b2 ("USB: Fix device driver race") > > inadvertently broke usbip functionality, which I resolved in an incorrect > > manner by introducing a match function to usbip, usbip_match(), that > > unconditionally returns true. > > > > However, the usbip_match function, as is, causes usbip to take over > > virtual devices used by syzkaller for USB fuzzing, which is a regression > > reported by Andrey Konovalov. > > > > Furthermore, in conjunction with the fix of another bug, handled by another > > patch titled "usbcore/driver: Fix specific driver selection" in this patch > > set, the usbip_match function causes unexpected USB subsystem behaviour > > when the usbip_host driver is loaded. The unexpected behaviour can be > > qualified as follows: > > - If commit 41160802ab8e ("USB: Simplify USB ID table match") is included > > in the kernel, then all USB devices are bound to the usbip_host > > driver, which appears to the user as if all USB devices were > > disconnected. > > - If the same commit (41160802ab8e) is not in the kernel (as is the case > > with v5.8.10) then all USB devices are re-probed and re-bound to their > > original device drivers, which appears to the user as a disconnection > > and re-connection of USB devices. > > > > Please note that this commit will make usbip non-operational again, > > until yet another patch in this patch set is merged, titled > > "usbcore/driver: Accommodate usbip". > > > > Cc: # 5.8: 41160802ab8e: USB: Simplify USB ID table match > > Cc: # 5.8 > > Hello Greg, > > Sorry for the lateness of this e-mail. > > I had noted commit 41160802ab8e ("USB: Simplify USB ID table match") as a > prerequisite in the commit message, but I just realized that the commit > identifier refers to a commit in my local git tree, and not to the actual > commit in Linus Torvalds' git tree! I apologize for this mistake. > > Here is the correct commit identifier: > 0ed9498f9ecfde50c93f3f3dd64b4cd5414d9944 ("USB: Simplify USB ID table match") > > Perhaps this is why the prerequisite commit was not cherry-picked to the 5.8.y > branch. > > As a justification for the cherry-pick, commit 0ed9498f9ecf actually resolves > a bug. In summary, this commit works together with commit adb6e6ac20ee ("USB: > Also match device drivers using the ->match vfunc", which has been cherry-picked > as part of v5.8.6) and ensures that a USB driver's ->match function is also > called during the search for a more specialized/appropriate USB driver, in case > the driver in question does not have an id_table. > > If I am to be the devil's advocate, however, then given that there is only one > specialized USB device driver ("apple-mfi-fastcharge"), which conveniently has > an id_table, and also given that usbip no longer has a match function, I also > realize that it may not be crucial to cherry-pick 0ed9498f9ecf as a prerequisite > commit. I'm sorry, but I don't really understand. Does 5.8.y need an additional patch here, or is all ok because I missed the above patch? thanks, greg k-h