Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3379785pxb; Sun, 20 Feb 2022 18:11:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtTsitXBZoPoBpr5B16MWHNsXdle+ggZRpfFgDL2S+3I+iVH1ugjY6Yylvt7mWi2f78596 X-Received: by 2002:a17:907:766a:b0:6cf:bb20:70c with SMTP id kk10-20020a170907766a00b006cfbb20070cmr13892529ejc.94.1645409506978; Sun, 20 Feb 2022 18:11:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645409506; cv=none; d=google.com; s=arc-20160816; b=CagusIpF+xHu23Ns5ZjewCfcCavMHg3TAl4HpZoLtprzxyun+JKn5tGERYUuKHd+Tu XdKtnruofxNXlBm7lqJvVec/04vJYIjkeGHy5fnVLDa+2re89ORgvwhqksbk+a1tgRxw B8J0pj/00fkYWIWk3VAozOxzgYsvz71YvL2BbMrVjGV+ClFbG8MQ2NGdD2jsglT1Qivh /7RZRNTN3NRgGwsHGoaU98aZSbaVdjCFHH2xZOfeZaznDqVsI4pm+gJaoWHmpK+7bNd0 iryvfH0fDkmZsL8HWGGiYb4ezM6I/oKyGsOCcVNrxsoMeL+qAvusuI8m1I9Rrw6C7Hqw P4hw== 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=/eyFBQIssSHfMITXzi+XXKfRUjILW81BlB83URSz/9w=; b=GwPXu/lNMLFkXtZcyzkJsLLFKpR2Bs8hTYUGZbz96GzepsYkWKHXfUyD8UwDR6DHhp TzRoPYlPWqHenQyHgC5lJhbXbACJptOlkblTGHoHZXeb4uTJXBvWocrXrMpCnmp/bSZR aESNLlvRJ7Sv9TCPNfAlRQ+XiOXn56hXinZU8uXmuC6RxxRHKwboHbdYtwbKmRMauSJe beXzoxUaAPY7vllX1hQ9y8vAOwS18Lf7ImM79WJaw3QfSX+Nb+5OOp6gyIKeh+nGsT7E hU3nAtT3/Ekayo+vaUvrrS/OXigUkZAcAlgD35iquWcN029zWGt2bq/Q0pGAvIXjjAbr IxiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TaUqLKpv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15si9940887edu.625.2022.02.20.18.11.24; Sun, 20 Feb 2022 18:11:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TaUqLKpv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245219AbiBTXCS (ORCPT + 99 others); Sun, 20 Feb 2022 18:02:18 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbiBTXCQ (ORCPT ); Sun, 20 Feb 2022 18:02:16 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6105744778; Sun, 20 Feb 2022 15:01:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3625FB80D9C; Sun, 20 Feb 2022 23:01:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6335EC340E8; Sun, 20 Feb 2022 23:01:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645398110; bh=5OmhqiX81KNtJ2T9a1Vvx/TvbU7V6OHOgTfNkZczbi8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TaUqLKpvotaUtMI8vne0jeoBkaeQq1P8eGmdDbHTHAsS/UaxXKDnlcXh6aOf1aUZr luLTFDhhsokTV6aiWcF94lLz8zLgJcrRrkRi+2X2aKcTc+JdwLGSCdbtVoa16CThNL 5HuBuqD2B4wGo15xM+5zebx7Qk9yeNyMzg9lVeAsidOrgnAyJp4Lzpgr+0iYfbA/lq lZXe1j9Z9EcnyOcdkWtQH/a8PzuCHtVPyeyHgzgEmNZ8c6XuUVEN1wWswYEGwpboU9 BpXkmlht1y9yoc0crbgjKG5A8RfkHC4BCi4tumSzb4gr5d1T0GlBBvlhbIgCkRetaG TuYfhAGXfsbNA== Date: Mon, 21 Feb 2022 00:02:28 +0100 From: Jarkko Sakkinen To: Nayna Jain Cc: linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, dhowells@redhat.com, zohar@linux.ibm.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dimitri.ledkov@canonical.com, seth@forshee.me Subject: Re: [PATCH v8 0/3] integrity: support including firmware ".platform" keys at build time Message-ID: References: <20220111183647.977037-1-nayna@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220111183647.977037-1-nayna@linux.ibm.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 11, 2022 at 01:36:44PM -0500, Nayna Jain wrote: > Some firmware support secure boot by embedding static keys to verify the > Linux kernel during boot. However, these firmware do not expose an > interface for the kernel to load firmware keys onto the ".platform" > keyring, preventing the kernel from verifying the kexec kernel image > signature. > > This patchset exports load_certificate_list() and defines a new function > load_builtin_platform_cert() to load compiled in certificates onto the > ".platform" keyring. > > Changelog: > > v8: > * Includes Jarkko's feedback on patch description and removed Reported-by > for Patch 1. > > v7: > * Incldues Jarkko's feedback on patch description for Patch 1 and 3. > > v6: > * Includes Jarkko's feedback: > * Split Patch 2 into two. > * Update Patch description. > > v5: > * Renamed load_builtin_platform_cert() to load_platform_certificate_list() > and config INTEGRITY_PLATFORM_BUILTIN_KEYS to INTEGRITY_PLATFORM_KEYS, as > suggested by Mimi Zohar. > > v4: > * Split into two patches as per Mimi Zohar and Dimitri John Ledkov > recommendation. > > v3: > * Included Jarkko's feedback > ** updated patch description to include approach. > ** removed extern for function declaration in the .h file. > * Included load_certificate_list() within #ifdef CONFIG_KEYS condition. > > v2: > * Fixed the error reported by kernel test robot > * Updated patch description based on Jarkko's feedback. > > Nayna Jain (3): > certs: export load_certificate_list() to be used outside certs/ > integrity: make integrity_keyring_from_id() non-static > integrity: support including firmware ".platform" keys at build time > > certs/Makefile | 5 ++-- > certs/blacklist.c | 1 - > certs/common.c | 2 +- > certs/common.h | 9 ------- > certs/system_keyring.c | 1 - > include/keys/system_keyring.h | 6 +++++ > security/integrity/Kconfig | 10 +++++++ > security/integrity/Makefile | 17 +++++++++++- > security/integrity/digsig.c | 2 +- > security/integrity/integrity.h | 6 +++++ > .../integrity/platform_certs/platform_cert.S | 23 ++++++++++++++++ > .../platform_certs/platform_keyring.c | 26 +++++++++++++++++++ > 12 files changed, 92 insertions(+), 16 deletions(-) > delete mode 100644 certs/common.h > create mode 100644 security/integrity/platform_certs/platform_cert.S > > -- > 2.27.0 To sort out tree conflicts: what if I pick these patches? They look fine to me now. I can try to fix the possible merge conflicts and you can check them before I make a PR. /Jarkko