Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2693279rdb; Mon, 4 Dec 2023 05:10:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDFb9PqmClBmaCSZiyCeSNL/Nxc5vuvetbXYt9Ld6S0D2St3pj+V+8jAIyQl2mivp9cSHa X-Received: by 2002:a17:902:e887:b0:1d0:aeda:9ad5 with SMTP id w7-20020a170902e88700b001d0aeda9ad5mr795248plg.34.1701695437256; Mon, 04 Dec 2023 05:10:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701695437; cv=none; d=google.com; s=arc-20160816; b=ef1eJ6Hyfu4ZKf0N8tPNHUrJ9cME5DbClQv03mfPmT6K67hxloNjX+sLXPucvN5YQN GPmzWa4dLMSUmF5maQInoMClk6m2guX5XYoQxSVOEqYLfHzKbVmLgDXvgG1evz7fkrs3 79v3XLKnTPvaZczXxBrI0S4M71ZkGiZ0cb9MvI+GYIsH2Y0ywOxU4kxJM7s9NPeemLTJ Fc2LGtidN7MliOp9h1wkZ2yG3wfNqaDJsMuHnJcmdefBq6HQT0r/baC9wWvTxzRMKFTv sszDEdm/xqJCik5fM0I5e+FXTIh8PhX80DZtVDn301XBCAQxSX13/sP3bdY0Wj6ImNRx xyCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=+YD0azE9XkpGBvzOSbiERfwFUuzUxlnAVwvAe6XDPmo=; fh=1m/pYHmVQ2ls8YzAYIoj2iJCJmPFxVuPGyuWWK11Tcc=; b=UaRAtAc5/g5govDIpuwmJyCmXcspwW7Ry+IrkZ/Kc1lPD6jp+2c6h1hH3nBTZao7XX Y1YGLPCZOQ7yORloHveyWv/K79o6bh+5C67lE5YyCPNLDQ9ESC4g/rvvuSim2mNgeE7Z EURi4Paye6VGTGiGO57VHs9fjfFp9pa1TtmdU115+BgqZc7wHv0ntfLSXvcHIk2IrgKO kEZWEr7J33rLQNBGCIK49wIHNLCYSGtika11tPvDzx9cp5F4vs+57NBXtwXqZ52/Pvv2 2Fd471pNbFW1XFrxb6Gcm7KgP+nOAo8vhIvLcD96ImRluDZ5VRaugPllER/UozWCPwaV q3Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="BOqSbqF/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bc6-20020a170902930600b001d0b6d1d463si612826plb.351.2023.12.04.05.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:10:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="BOqSbqF/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BE4AA8075028; Mon, 4 Dec 2023 05:10:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235457AbjLDNJr (ORCPT + 99 others); Mon, 4 Dec 2023 08:09:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235450AbjLDNJU (ORCPT ); Mon, 4 Dec 2023 08:09:20 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72828D45; Mon, 4 Dec 2023 05:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701695363; x=1733231363; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=4q8sIrDSIwqjWK+DiPqyfA+yiSDchtuZxyCuf8fsg2o=; b=BOqSbqF/Dhrpoal3CXUr5lQjNzeJN3sZ7rv0gZdvLH6pTkuYAYOdwOkX ZYb3tCX8LIjdKDWPj4c+++XoIK4RWWqx7qBNzs2PdVI/NhBa4MxzQoQr2 IwDTNJspYqRlQLYw6yNYiV/72lyMP9oU6mNDQKxjVh6yeGqxAA4ktZL3Z cp42SIiAQT2xdXdNvz+qmn667aTC2c5aSvsoBeDSGJkgK3wwa/4JRTPMn kaxtLk2dFM/db2CKRsrFWU4q+CEADp0FYuzbhkfm0w7dXQSUsxtGNHTKN Hbnldc5va/Eo88NDMBeLd6BSOvWWMfsHA2mbEp8eQjyqq7932j+D7Qfqb A==; X-IronPort-AV: E=McAfee;i="6600,9927,10913"; a="384132455" X-IronPort-AV: E=Sophos;i="6.04,249,1695711600"; d="scan'208";a="384132455" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 05:09:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10913"; a="1017844609" X-IronPort-AV: E=Sophos;i="6.04,249,1695711600"; d="scan'208";a="1017844609" Received: from malladhi-mobl.gar.corp.intel.com ([10.249.34.28]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 05:09:20 -0800 Date: Mon, 4 Dec 2023 15:09:18 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: David Thompson cc: Hans de Goede , markgross@kernel.org, vadimp@nvidia.com, platform-driver-x86@vger.kernel.org, LKML , kblaiech@nvidia.com Subject: Re: [PATCH v3] mlxbf-bootctl: correctly identify secure boot with development keys In-Reply-To: <20231130183515.17214-1-davthompson@nvidia.com> Message-ID: References: <20231130183515.17214-1-davthompson@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1232564795-1701695362=:3149" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 05:10:30 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1232564795-1701695362=:3149 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 30 Nov 2023, David Thompson wrote: > The secure boot state of the BlueField SoC is represented by two bits: > 0 = production state > 1 = secure boot enabled > 2 = non-secure (secure boot disabled) > 3 = RMA state > There is also a single bit to indicate whether production keys or > development keys are being used when secure boot is enabled. > This single bit (specified by MLXBF_BOOTCTL_SB_DEV_MASK) only has > meaning if secure boot state equals 1 (secure boot enabled). > > The secure boot states are as follows: > - “GA secured” is when secure boot is enabled with official production keys. > - “Secured (development)” is when secure boot is enabled with development keys. > > Without this fix “GA Secured” is displayed on development cards which is > misleading. This patch updates the logic in "lifecycle_state_show()" to > handle the case where the SoC is configured for secure boot and is using > development keys. > > Fixes: 79e29cb8fbc5c ("platform/mellanox: Add bootctl driver for Mellanox BlueField Soc") > Reviewed-by: Khalil Blaiech > Signed-off-by: David Thompson > --- > + } else if ((use_dev_key) && > + (lc_state == MLXBF_BOOTCTL_SB_LIFECYCLE_GA_SECURE)) { > + return sprintf(buf, "Secured (development)\n"); > } Thanks for the update. Applied to review-ilpo and will propagate into fixes once LKP has built it. I removed the unnecessary parenthesis around that use_dev_key while applying the patch. -- i. --8323329-1232564795-1701695362=:3149--