Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp323566pxu; Tue, 6 Oct 2020 07:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxyucuodNWAV6doYFBJGperr8m8Ult6UJDtPAiWBBX8o7lR8oEANVhLmWkJLkTzNq8E3+h X-Received: by 2002:a17:906:388:: with SMTP id b8mr5190485eja.62.1601993936878; Tue, 06 Oct 2020 07:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601993936; cv=none; d=google.com; s=arc-20160816; b=sKL4KIT4J9Q7pFqns0f9BSpOrFKIKrclh0mgE63sS4Tu684wG/LO+cWQ6i8BWl4eSB w+TVJcQmhByAZb3H6U2SrronR/3csQ3ZKO53rprtCo3MksgcP8VhwxDNphCHG3Q8/p5I iICHvv8kG21FzvAq69OroTXM/ShxJL7o6ByKHXeJhZZ1cTlAefUXTSqN7XJWcXKV2lPz Szv1WWswVPxG66U1YDLMd5WIN/xTXW9vb7t2ofQ6fufuqnLfBnp6U3nZagGTOTqEuyQK i79nA4YXNIZZcPRJzl/w4pTx2D9pOcfgfVX93saz8sL3YInd0tpPpWGl67j0ZJieWyqq L84A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TeGxjBzT6R6tYdJmUFRAv74SJEyv88BooIGE4Bn2zy8=; b=qpX48AWUhaWG3Bpu/mCDObi335ldp0DST3kUfrDyhQhLOaqJyXi2z43ihITHeYZ6UP RTCEvmmzgcGB0R34cerSHpIVCmooztcxssWhDYAuItShOF2Ky77JJs+Xdx/0oe6s6lnl 5UOwb6eAKfwCp1538nAhxV+h0QbeCwQMNp4zgok3KJTEq0HTNc+wj3PH88bCTDzL6x2Z FLLyeMpEIbOLRhMuEZH6nRkwF8Plj9hPAHrbEKbE6QgPDnCvJacDvdmKTRa1p4+I+JvZ 4yqwixdbdm0TDTjPM71g/TBCjUHLOR4DKvhzNqDuR26SaEz/7roILf/ucn3JdBiekrAk 7CFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@runbox.com header.s=selector1 header.b=IlpqtjLC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=runbox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si676572ejy.529.2020.10.06.07.18.32; Tue, 06 Oct 2020 07:18:56 -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=@runbox.com header.s=selector1 header.b=IlpqtjLC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=runbox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726459AbgJFOOi (ORCPT + 99 others); Tue, 6 Oct 2020 10:14:38 -0400 Received: from aibo.runbox.com ([91.220.196.211]:47118 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbgJFOOh (ORCPT ); Tue, 6 Oct 2020 10:14:37 -0400 X-Greylist: delayed 2871 seconds by postgrey-1.27 at vger.kernel.org; Tue, 06 Oct 2020 10:14:36 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=TeGxjBzT6R6tYdJmUFRAv74SJEyv88BooIGE4Bn2zy8=; b=IlpqtjLCedSA/jGCw/o/KSMVmN IUf1rufygTDXaKVJCQ4m7JnH0gpjYClTpHm+g+uxBOSLjPWr85UQZ9gd9juk9k/YoGmvF1gIUEIPz 7/h4ENchER4gMQ8r5kpoE1SQqRfmvxltF/SJFgKRBOOQCRsyuLF4gOSUQZzJfSSyrzSbpYHPmeVM4 28WzqsQdGabkJXM7HvI2HnMuytYOdttxl2P6/9FvzJ23FWN2SwArjC5UA7dozzeUGQmx7eyZjRIOb NKVwnkB/XWxwqDLRFvIuFV43TWIPi7mGbnuMIb0Ehy0N0yKgiFsHZvkpq+zb1evKUjUbitPZdY2eN 6HPiOP7w==; Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1kPmzE-0002BJ-Tq; Tue, 06 Oct 2020 15:26:37 +0200 Received: by submission03.runbox with esmtpsa [Authenticated alias (536975)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1kPmz8-0000RQ-Tk; Tue, 06 Oct 2020 15:26:31 +0200 Subject: Re: [PATCH 5.8 05/85] Revert "usbip: Implement a match function to fix usbip" To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Bastien Nocera , Valentina Manea , Shuah Khan , Alan Stern , syzkaller@googlegroups.com, Andrey Konovalov , Shuah Khan References: <20201005142114.732094228@linuxfoundation.org> <20201005142115.000911358@linuxfoundation.org> From: "M. Vefa Bicakci" Message-ID: Date: Tue, 6 Oct 2020 16:26:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201005142115.000911358@linuxfoundation.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 just wanted to bring this to your attention. Thank you, Vefa