From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89A6A49365C; Wed, 26 Aug 2026 14:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787754345; cv=none; b=qcx2m33OJpDrajXNnNzWW2PKBSFmcbXOYzEzZGxYLRE1gZ6qg0TgSzPhKshYbVfzyprMg3ZqwodZLTkOo4aNcGtvuPjKoTb+4o0IUQw8TSZMvtyR7lEnlwuRsXpiH9SQKmAaHOW/XI8LL4vi36WAnSpqf+Z8qNUNl298p7/724E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787754345; c=relaxed/simple; bh=UucQZSqT7U4kBDKh05ISPmkf/HI1+SJCHSgQkiFjlGs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=toX9fwsHsHcEAn7l1tpUYFSCVoqePlvnr0i184Vc3yjQveFn3JKmzVgQV7aFgQHK2R4/H/6SaV31y1eWUdv//qe+Gkx8EgAg1jFShup+Gerw5KUah5ajSO/ZM2aFGmiKAEpdyfG2mmQ3VIRhjTYxmBCRLqCT9D9+zthIbPhUags= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nEBvZkEn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nEBvZkEn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CD041F000E9; Wed, 26 Aug 2026 14:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787754344; bh=QgPiV1N6jxebGfoGJS2x8XbJ34mCs881jJPM3Kvzc+4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nEBvZkEnYqXl9pQFnEk2j/Vsf/KxCMAjlueCfD5aW3oyEa3HGOpEnOOPiO4eUdM6Y 1IuQgrJhr7+oWO0FLrGbMrEW6TYh0iflqj0UNkipJ5/TDAOgrhuOt7SRYDW1ficc88 TOLlBG1plb/E8Qb8c9/eMo3wc5c3M/qWElhQwyN8= Date: Wed, 26 Aug 2026 16:25:42 +0200 From: Greg Kroah-Hartman To: Michal Pecio Cc: Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Jonathan Corbet , Shuah Khan , Randy Dunlap , "Rafael J. Wysocki" , Danilo Krummrich , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-usb@vger.kernel.org, driver-core@lists.linux.dev, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Message-ID: <2026082658-statue-census-dc39@gregkh> References: <20260826-bind_taint-v1-0-52b05f4a965c@linuxfoundation.org> <20260826153311.6340efcd.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260826153311.6340efcd.michal.pecio@gmail.com> On Wed, Aug 26, 2026 at 03:33:11PM +0200, Michal Pecio wrote: > On Wed, 26 Aug 2026 11:19:31 +0200, Greg Kroah-Hartman wrote: > > The ability to add and remove devices from a driver through the sysfs > > "bind" and "unbind" files was created all those decades ago as a way > > that kernel developers can iterate faster, and provide a debugging way > > for users to attempt to add a new device to a driver without having to > > rebuild their kernel. > > > > This api over the years has been abused and recently come under a major > > fuzzing "attack" through tools like syzbot which decided that it would > > attempt to just randomly bind any driver to any type of device, causing > > loads of unneeded errors and pointless kernel patches to be generated by > > unsuspecting new developers. > > Hi Greg, > > I think you confused 'bind' / 'unbind' with the likes of 'new_id' and > 'driver_override'. Try binding xhci_hcd to NVMe, you won't get far. It seems to result in a failure report that people keep sending random patches for :( > FYI, besides being footguns, the latter are apparently used to assign > any random PCI device to some VM drivers for passthrough or whatnot. Which should be fixed. > The former hardly are footguns and have further common uses, such as > removing kernel drivers to make VM / USBFS work or "turn it off and on > again" when a driver doesn't implement recovery. I've seen a published > script which does this automatically when xhci goes belly up... And we should fix the root cause here. > I am also not convinced that fuzzing 'unbind' alone is a bad thing. > How is that different from 'rmmod' or pulling out a USB-C plug, which > may have a bunch of USB *and* PCI devices behind it, mid-operation? rmmod too is something that is never guaranteed to work, and is for developers. "luckily" syzbot doesn't seem to want to do that just yet :) This is to stem the tide of foolish patches where people/syzbot is attempting to bind any random device to any random driver and then reporting a "bug" for when things go wrong. It is also here to mark a kernel as "hey, something was manually overridden" if a normal user does this and then attempts to ask for support for us. Both are good things for developers to know about. thanks, greg k-h