Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1662861ybh; Thu, 23 Jul 2020 14:47:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySZf2iQ3mGsiNX8Lqh52ZLKoGG2Qqw9y4I9qVKTVsWKmE5zOllUmr78Me8xRzabR1jqMlF X-Received: by 2002:a50:d09c:: with SMTP id v28mr6197517edd.58.1595540875319; Thu, 23 Jul 2020 14:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595540875; cv=none; d=google.com; s=arc-20160816; b=jDUuR9PSyeU2p4l6STJbwaRI0HC4yJeknhkquA0CxBgvKhzAsBzzag9wJzUMXKuClu geXcl2lws62g0OJzQ6EAFJOq4rmaTcmP2ZGQ6ZyjaSt5iEk8aVc1jP4UkQiaQecvifDe PchESMA3xXdSRPg43ZUeW3hb+fzSve17rqSXRhxrZ81hqlj3aWr5SRZJlsc/qvNN7JtU XxxCQyxw75MOh6o08AzPyTd3deUydoI5hVptTnNfe3fQxc7vb1GDg6v2/Q6e6Xm2Nvf+ y5QMdyvhOfjRkgtOtHhURQ760iGk0O/7lz1eR6t3nuzmI5KHnqT5eaRvpMhCKkG+iXvE FKwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=UdibMkIfiJGT/xfr6QneCjilJT94zqvGgjZC7UuTt7U=; b=JDMsMsmeLVIlYuiAUJVxiS8aHdazzuWUbWH/QmR3rZfRH+be8zbKYg+bxuag02L8hP 4sYWTtcCnKSSO5vn7f1iK8JdAeNY5j1dXtyAbJ94HHW1wcwu0BM22lg1ddg37GN0GuUi +iRezVccjf1sCNCgU5yFYZO5wmgT0b6ib2IET3JihRiTGtVZm1DV48hHSEiNb+czNAX5 Vk59zzTFnRdhcoCloSgEx5oxZ+MlaMoc/YvnM8PKo8ugXdSaICI50a4qjfS6ZQdQMtzC wSPhKGuZ+5P3XyBr8fitVini2AIpSbBCreMfs2FDZrLrKiDkN+AzqIqJG83zAr57v7A3 67EQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 dh1si2761278edb.54.2020.07.23.14.47.30; Thu, 23 Jul 2020 14:47:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S1726390AbgGWVrZ (ORCPT + 99 others); Thu, 23 Jul 2020 17:47:25 -0400 Received: from mga04.intel.com ([192.55.52.120]:44370 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726173AbgGWVrZ (ORCPT ); Thu, 23 Jul 2020 17:47:25 -0400 IronPort-SDR: IHiOQUigsowuovwF9++LoAbHkFLEviz8Ueu8V+fucqfxakLRBFcc4mh+cItJlfNLDfdPwfAvJe sTWaVTzFJH6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="148119970" X-IronPort-AV: E=Sophos;i="5.75,388,1589266800"; d="scan'208";a="148119970" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 14:47:25 -0700 IronPort-SDR: DR3gv6LNQVyX5Ww+GFh6oO5u5AZ/6kZgXFBP/+g4YSvs7wxsWPKWKERIyDixI8ngadk6lYYImp JN37i6bEyAvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,388,1589266800"; d="scan'208";a="311183940" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.51]) by fmsmga004.fm.intel.com with ESMTP; 23 Jul 2020 14:47:22 -0700 From: Giovanni Cabiddu To: alex.williamson@redhat.com, herbert@gondor.apana.org.au Cc: cohuck@redhat.com, nhorman@redhat.com, vdronov@redhat.com, bhelgaas@google.com, mark.a.chambers@intel.com, gordon.mcfadden@intel.com, ahsan.atta@intel.com, fiona.trahe@intel.com, qat-linux@intel.com, kvm@vger.kernel.org, linux-crypto@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Giovanni Cabiddu Subject: [PATCH v3 0/5] vfio/pci: add denylist and disable qat Date: Thu, 23 Jul 2020 22:47:00 +0100 Message-Id: <20200723214705.5399-1-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patchset defines a denylist of devices in the vfio-pci module and adds the current generation of Intel(R) QuickAssist devices to it as they are not designed to run in an untrusted environment. By default, if a device is in the denylist, the probe of vfio-pci fails. If a user wants to use a device in the denylist, he needs to disable the full denylist providing the option disable_denylist=1 at the load of vfio-pci or specifying that parameter in a config file in /etc/modprobe.d. This series also moves the device ids definitions present in the qat driver to linux/pci_ids.h since they will be shared between the vfio-pci and the qat drivers and replaces the custom ADF_SYSTEM_DEVICE macro with PCI_VDEVICE. The series is applicable to Herbert's tree. Patches 1 to 3 apply also to Alex's tree (next). Patches 4 and 5 are optional and can be applied at a later stage. Changes from v2: - Renamed blocklist in denylist - Patch #2: reworded module parameter description to clarify why a device is in the denylist - Patch #2: reworded warning that occurs when denylist is enabled and device is present in that list Changes from v1: - Reworked commit messages: Patches #1, #2 and #3: capitalized first character after column to comply to subject line convention Patch #3: Capitalized QAT acronym and added link and doc number for document "IntelĀ® QuickAssist Technology (IntelĀ® QAT) Software for Linux" Giovanni Cabiddu (5): PCI: Add Intel QuickAssist device IDs vfio/pci: Add device denylist vfio/pci: Add QAT devices to denylist crypto: qat - replace device ids defines crypto: qat - use PCI_VDEVICE drivers/crypto/qat/qat_c3xxx/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_c62x/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_c62xvf/adf_drv.c | 11 ++--- .../crypto/qat/qat_common/adf_accel_devices.h | 6 --- drivers/crypto/qat/qat_common/qat_hal.c | 7 +-- drivers/crypto/qat/qat_common/qat_uclo.c | 9 ++-- drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 11 ++--- drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 11 ++--- drivers/vfio/pci/vfio_pci.c | 48 +++++++++++++++++++ include/linux/pci_ids.h | 6 +++ 11 files changed, 87 insertions(+), 55 deletions(-) -- 2.26.2