Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp533012rdb; Thu, 5 Oct 2023 13:11:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjjPYaXrP3o8JX8DKI8jFVvyhPUx4virSSAz3KGAIBxQnSz9WufNNqubRnPDGNxbM1vpbK X-Received: by 2002:a17:90a:a38b:b0:274:99e7:217e with SMTP id x11-20020a17090aa38b00b0027499e7217emr6021854pjp.16.1696536682157; Thu, 05 Oct 2023 13:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696536682; cv=none; d=google.com; s=arc-20160816; b=Y3mMh2ORyDNjnQL/OnsIKyOJ7oRHCs9a0xf+z0KpLxTG/ArOI6nP/cnf6S83aSG6Pt /4fDWVugW/Ch0HlOPONn/CglrbZ8+rdrtQ8iImCXFvr0xB5xTwHWn8Xvho+c5xbEFy0f SG1Tu6cWozl8OFWdYaaXrm3BZXCU+PBvBRj5ecseBVSWSdXEpSofb0KgyaHdPjaAjAHS e5kCP+MEyR3w6UnrNISMGbECz0PXcvMccLtNkCy+PrMap1w0RPRBrfeSDv7TMhAn3Sdz yfYIbXbdPZXAt2dpO7+r1+NQ3T4upYiVtq4+4GRFM0OT5fFuAS89WgNVxyGu2v6cVo0x mDdQ== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=hAvxjZODxZ+Urt8o6nnCK6eZ7L9WQV6n/uRZCZ3wuv4=; fh=1sfIl+GtejlyZDkKOo4f1iHTY1bbrvaqi+T3opPXnDM=; b=J81cp2kwaXBpYkmow4YpCaLqdSVuNCyClQc4bbAH3/vgUwBrnDQFo4lT5R4gnQYsfS KPoF/Dt/KZfJau00BA+wR+xsY0wsE0mEZvblxKho+p94qNbQSyCpKD4l05K66rD57lIu 7EW6IdoaB3UXNWdZBhuE1UIpE6TKMSn4D3lqE5SmixOxIwFb5NKK5U6p2SdS2Tm/mCK6 PG4i5ZbcIUq9TAHIq3cIIj0K7frzeQ7jNTDICQv3QNRkctsgsrkU1QxEOxATsXxVQE+4 k928LPUaE/sZ+NKrarzc+bwfEybYqNp4fq5LiQUL1fach9/mUnwUyjWIkbXT3lLSqMr/ 9WWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mviExf4N; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id b11-20020a17090a6acb00b0027907babca7si4374354pjm.166.2023.10.05.13.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 13:11:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mviExf4N; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 174B18078CA6; Thu, 5 Oct 2023 13:10:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230149AbjJEUK3 (ORCPT + 99 others); Thu, 5 Oct 2023 16:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjJEUK3 (ORCPT ); Thu, 5 Oct 2023 16:10:29 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4256BE4; Thu, 5 Oct 2023 13:10:28 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9484EC433C7; Thu, 5 Oct 2023 20:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696536627; bh=kOtDZyN8W/OVpOi7epksuraFOFD3cHQ5EafKpD9MeJM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=mviExf4NRlegLwrNCAv0i84ZpFFF+N3iPOe4Lo1C9bTC9M5EUm6Lgyi0ff880nnVM P5IK0+VEsqCmnIL7m+wfunoRRMc4jFdIuMk3HVRZZJo3MDoMkeXZl/SDBt3jxRF9fC SxfiDJnF762XuY92yCY1n+kr5jEsI8SKFhi514tXrv0aucwEL+Zj2JQtFqQUbcHn8p 9o8sSPyaCG3oXGixb8LLbf3zngRK6iGRLTcreiXVa28ItYFjd5XlK8AWymEbnrgN4t c0NJvz3ihzYjs7XUmMnnT4WS1Vbru1dodeBnPJchRlpdKbC/iTE3MttWSf8HOy6EUr mJXwMHWWBuk9Q== Date: Thu, 5 Oct 2023 15:10:26 -0500 From: Bjorn Helgaas To: Lukas Wunner Cc: David Howells , David Woodhouse , Herbert Xu , "David S. Miller" , Alex Williamson , linux-pci@vger.kernel.org, linux-cxl@vger.kernel.org, linux-coco@lists.linux.dev, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, kvm@vger.kernel.org, Jonathan Cameron , linuxarm@huawei.com, David Box , Dan Williams , Dave Jiang , "Li, Ming" , Zhi Wang , Alistair Francis , Wilfred Mallawa , Alexey Kardashevskiy , Tom Lendacky , Sean Christopherson , Alexander Graf Subject: Re: [PATCH 08/12] PCI/CMA: Authenticate devices on enumeration Message-ID: <20231005201026.GA789128@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7721bfa3b4f8a99a111f7808ad8890c3c13df56d.1695921657.git.lukas@wunner.de> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 05 Oct 2023 13:10:31 -0700 (PDT) On Thu, Sep 28, 2023 at 07:32:38PM +0200, Lukas Wunner wrote: > From: Jonathan Cameron > > Component Measurement and Authentication (CMA, PCIe r6.1 sec 6.31) > allows for measurement and authentication of PCIe devices. It is > based on the Security Protocol and Data Model specification (SPDM, > https://www.dmtf.org/dsp/DSP0274). > +#define dev_fmt(fmt) "CMA: " fmt > +void pci_cma_init(struct pci_dev *pdev) > +{ > + struct pci_doe_mb *doe; > + int rc; > + > + if (!pci_cma_keyring) { > + return; > + } Jonathan mentioned the extra brackets below; here's another. > + if (!pdev->spdm_state) { > + return; > + } > + if (IS_ERR(pci_cma_keyring)) { > + pr_err("Could not allocate keyring\n"); There's a #define dev_fmt(fmt) above, but I don't think it's used in this patch. I think this would need something like: #define pr_fmt(fmt) "PCI: CMA: " fmt