Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp497147pxt; Thu, 5 Aug 2021 05:01:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFqDJNUq9jefvHEyb73mUPkrR6CT/fMvjv11NWDHcB+A1dDt/DIIyBxAp4kiVRpDZ5bW+8 X-Received: by 2002:a02:cc21:: with SMTP id o1mr4333764jap.114.1628164911382; Thu, 05 Aug 2021 05:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628164911; cv=none; d=google.com; s=arc-20160816; b=G/h3jJgX8vu87gJ+orvdcU0qsgODw5IIvvQ+ZpaxCnuKNMx+HNTsMKmGgTtUmCcEYv oGP6ZYfuMeKlcdJFGHoouDlADLWqEjaTQo8iCLuWGjFahd5H9H/D7jgqS0cfzs2rfUfo tYOB/YWbWDSzWHZLvaFJFNtmTNLie3VBvmD8KQXqP2Xx0PU3tPHdBP+KPKs5XeaWDZOk /hPP5y+czODQmIugOiguSjtafwV7zNGUaLKgc44bv+exen+F1lodDI3CiIzf4AM4AL/l M/z+aneJinPvh5Ea4ITebHdNf11S+wUpT6S6P8T2WxFf++l2bsBVUoAsMePQoP/30+bf gOhQ== 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=U6IbBZPCuPiT82GT49nTDo9ndw/++wBjojqMYkK68GI=; b=TdAKW7gwlwCwZbYoIAuw/OOFxPW4Mz3zpDBAFE4xyFrE0TsQC8FJrun8GZkyHGuayg eI8X64mu1+LWTKRBYwaGHHeqVT/BruLCP0d2osnNBZ/CO7OlWg7yXbuPj3iFiqC8XppX rJGa5g3aM88f/53vjERs6cLV+T8evplATTcA+I0XJPpr20+qrnA5j8oMEx2QBgYf2gY5 nLGaSBjjumG+a13JO12rLg/8dc21SGIi7ApfqZ7oMQAmO3T10CF8ueR2Kld7jqQ4YDkL bTAUnZteV1jJ2dal5IpcX5J6jwHnP0QVcQO1GAjEorv42rS+U1j8WIDIymuWiHJ4Wyf7 RAIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="O9H/9+Jg"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si6245090ilu.89.2021.08.05.05.01.38; Thu, 05 Aug 2021 05:01:51 -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=@linuxfoundation.org header.s=korg header.b="O9H/9+Jg"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239133AbhHEIAD (ORCPT + 99 others); Thu, 5 Aug 2021 04:00:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:34266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231377AbhHEIAC (ORCPT ); Thu, 5 Aug 2021 04:00:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6CDD76044F; Thu, 5 Aug 2021 07:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628150389; bh=VQPRznZKq+7/Y3xFggDbn6ktS/w4o5Cb+eH7BbGxrd8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O9H/9+JgombTsydBEcmzdDXyDw/rn6nu5MBVtZ/uJNpBT/JYFnBisZoTHptUkOgFh zMcyxW6TGCf4JIXbpooxPBou4SQ6MN+o+1pjvwyrBJbtxy7584rJv+wxGfs+j621JR Rt6QUUtudd0bFHig25Rt+x2T925xgAvx6rZAtwJA= Date: Thu, 5 Aug 2021 09:59:45 +0200 From: Greg Kroah-Hartman To: Dan Williams Cc: Matthew Wilcox , Kuppuswamy Sathyanarayanan , "Rafael J . Wysocki" , Jonathan Corbet , Andi Kleen , Kuppuswamy Sathyanarayanan , Linux Kernel Mailing List , Linux Doc Mailing List Subject: Re: [PATCH v1] driver: base: Add driver filter support Message-ID: References: <20210804174322.2898409-1-sathyanarayanan.kuppuswamy@linux.intel.com> 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 Wed, Aug 04, 2021 at 02:28:32PM -0700, Dan Williams wrote: > On Wed, Aug 4, 2021 at 2:07 PM Matthew Wilcox wrote: > > > > On Wed, Aug 04, 2021 at 01:11:27PM -0700, Dan Williams wrote: > > > On Wed, Aug 4, 2021 at 12:29 PM Greg Kroah-Hartman > > > wrote: > > > > Why not just make distros that want to support this type of platform, > > > > also provide these tiny kernel images? Why are you pushing this work on > > > > the kernel community instead? > > > > > > In fact, these questions are where I started when first encountering > > > this proposal. Andi has addressed the single kernel image constraint, > > > but I want to pick up on this "pushing work to the kernel community" > > > contention. The small list of vetted drivers that a TDX guest needs > > > will be built-in and maintained in the kernel by the protected guest > > > developer community, so no "pushing work" there. However, given that > > > any driver disable mechanism needs to touch the driver core I > > > advocated to go ahead and make this a general purpose capability to > > > pick up where this [1] conversation left off. I.e. a general facility > > > for the corner cases that modprobe and kernel config policy can not > > > reach. Corner cases like VMM attacking the VM, or broken hardware with > > > a built-in driver that can't be unbound after the fact. > > > > I don't understand how this defends against a hypervisor attacking a > > guest. If the hardware exists, the hypervisor can access it, regardless > > of whether the driver is default-disabled by configuration. > > The "hardware" in this case is virtual devices presented by the VMM to > the VM. So if a driver misbehaves in a useful way for an attacker to > exploit, they can stimulate that behavior with a custom crafted > virtual device, and that driver will autoload unaware of the threat > without this filter for vetted drivers. As I just said elsewhere in this thread, we have support for this today for thunderbolt and USB, please just expand that to all bus types and that should be fine. thanks, greg k-h