Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1366253pxb; Fri, 1 Oct 2021 09:08:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSsYG1iQxkqI2jzeCe9Le9YHowHKUe7LRPKzYXebBHpciznFjMZEyNK2g8Q9USkZin3hou X-Received: by 2002:adf:e6d0:: with SMTP id y16mr13507202wrm.181.1633104526804; Fri, 01 Oct 2021 09:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633104526; cv=none; d=google.com; s=arc-20160816; b=i5yhkayT0lJKGjEZ3gWMxZSLB9j+0j2lV/ohDy0CRiONnFHlMigjQrfhOOFX5txT50 6AM1tDVnWfIebtsp1657oYUGSKxmPoI3vukifYd9osgV/2qqZxYPbgJ6c+wr5is67G9S bN9/Bgk4m/khOTYOaRfuxcGI0uf9B8cXIFdThrZVNT0v+YzwBUaK+J3rxWXqlhxRiXgT agRaOkHnSXsC6UZex0gi4S8MFMNMudWkaWQF+zlkdnOg45tV4Ni3ChmqvS9+GYccTNB3 6bSDAagNNRv4Swj/n1J4DOjpvn04Oj2l9zyf/gy0S/lhjwpXbYlIAZA8vw0P98LpcJrX khXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ta+4m/oB/wL/+02hJdbvkusdqwGrjEBPY1saHyPYu7M=; b=COJIoxvvr+t8tnpTley1y00ACIViJJLahjRCMW4wGNd/oRKaxzt90X4Lc4oEG1eLg3 mTXuGfiV8+rqn9l7swbHOi5ANkcsXAiaam0/2FLn0xuIzGWxh6KtS/etmmk5Usmq6iIl 0x1YsGaq58XfYljUWWqUazoRrmFxU5VatVgVtFmm+9Zu3ScZTHbUqRokPw1a0v/FWQzR 60PjM6L/jQ117fKePV3aEcG7yGthsxp0tbdJFUSslXaD8f8n3rEOvzQUqjrVxkYUCFKB ZmB4Qpkxp8q3wIZGS1MNBV+ndA1rr8GaJmOdj7P6lJ5AfoJa8NDrnfnAcRW+HbiG509K z71g== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si2111149ede.632.2021.10.01.09.08.21; Fri, 01 Oct 2021 09:08:46 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231190AbhJAP6h (ORCPT + 99 others); Fri, 1 Oct 2021 11:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:12729 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355134AbhJAP6V (ORCPT ); Fri, 1 Oct 2021 11:58:21 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10124"; a="222274169" X-IronPort-AV: E=Sophos;i="5.85,339,1624345200"; d="scan'208";a="222274169" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 08:56:33 -0700 X-IronPort-AV: E=Sophos;i="5.85,339,1624345200"; d="scan'208";a="619229588" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.135.37.9]) ([10.135.37.9]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 08:56:31 -0700 Subject: Re: [PATCH v2 2/6] driver core: Add common support to skip probe for un-authorized devices To: Alan Stern , Greg Kroah-Hartman Cc: "Michael S. Tsirkin" , Kuppuswamy Sathyanarayanan , Borislav Petkov , x86@kernel.org, Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Andreas Noever , Michael Jamet , Yehezkel Bernat , "Rafael J . Wysocki" , Mika Westerberg , Jonathan Corbet , Jason Wang , Dan Williams , Kuppuswamy Sathyanarayanan , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, virtualization@lists.linux-foundation.org, "Reshetova, Elena" References: <20210930065807-mutt-send-email-mst@kernel.org> <20210930103537-mutt-send-email-mst@kernel.org> <20210930105852-mutt-send-email-mst@kernel.org> <20211001155143.GB505557@rowland.harvard.edu> From: Andi Kleen Message-ID: <95b0e0c1-b0a2-944d-0b57-30360ac39a35@linux.intel.com> Date: Fri, 1 Oct 2021 08:56:31 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211001155143.GB505557@rowland.harvard.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Forget about trust for the moment. Let's say the goal is to prevent > the kernel from creating any bindings other that those in some small > "allowed" set. To fully specify one of the allowed bindings, you > would have to provide both a device ID and a driver name. But in > practice this isn't necessary, since a device with a given ID will > bind to only one driver in almost all cases, and hence giving just > the device ID is enough. > > So to do what they want, all that's needed is to forbid any bindings > except where the device ID is "allowed". Or to put it another way, > where the device's authorized flag (which can be initialized based on > the device ID) is set. > > (The opposite approach, in which the drivers are "allowed" rather > than the device IDs, apparently has already been discussed and > rejected. I'm not convinced that was a good decision, but...) > > Does this seem like a fair description of the situation? Yes. That's roughly what the patchkit under discussion implements. -Andi