From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47D39C433F5 for ; Sat, 2 Oct 2021 09:42:56 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08D1161A10 for ; Sat, 2 Oct 2021 09:42:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 08D1161A10 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F18C82C2B; Sat, 2 Oct 2021 11:42:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="RMVGFsWx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C2B582F08; Sat, 2 Oct 2021 11:42:49 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B315A81E1C for ; Sat, 2 Oct 2021 11:42:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from LT2ubnt.fritz.box (ip-88-152-144-157.hsi03.unitymediagroup.de [88.152.144.157]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id C40A2405E4; Sat, 2 Oct 2021 09:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633167760; bh=DZJlw5uxThkb/FvjF7tUvbu75TnYcqMKB/kjCXb63pY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=RMVGFsWxAh7Qtfa8wqweCQ2f4MKy9sdMyXAriIyE0Vqrs2IZhQ1XmgXudEP04Jqhi cHPHXG+GwQB68Ucs0BwcRN+8p7o+sLEq87bO+/qlnAzOffG3BIYbgTzcEbCKHiA8Dz 9Or4ME90ytI2T8wPHK7xyKC0U9E5xI4FyAK7hDPrksUFMkAOtbaPiw+6Ho2+J6qq24 f/XvgkgAoXl+2AOxqrVFU0k6wptCLr9R2QmIxxPkWTsL861SONGAkSC9mijc0QMVYn B43JVCmSs1BPw4+StuiyZApBdb7ip1ZShVukDOo+47IG4nIr6fGmNsJQIMj32wNMOf 3Vz3KkpNbC3lQ== From: Heinrich Schuchardt To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Alexander Graf , Masahisa Kojima , Heinrich Schuchardt Subject: [PATCH v2 0/4] efi_loader: centralize known vendor GUIDs Date: Sat, 2 Oct 2021 11:42:23 +0200 Message-Id: <20211002094227.119870-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The UEFI specification defines which vendor GUIDs should be used for predefined variables like 'PK'. Currently we have multiple places where this relationship is stored. With this patch series a function for retrieving the GUID is provided and existing code is adjusted to used it. v2: Remove a superfluous value check. Adjust commit messages and comments in the code. Heinrich Schuchardt (4): efi_loader: treat UEFI variable name as const efi_loader: function to get GUID for variable name efi_loader: simplify efi_sigstore_parse_sigdb() efi_loader: simplify tcg2_measure_secure_boot_variable() include/efi_loader.h | 2 +- include/efi_variable.h | 24 ++++++++++++++----- lib/efi_loader/efi_signature.c | 38 ++++--------------------------- lib/efi_loader/efi_tcg2.c | 31 ++++++++++++------------- lib/efi_loader/efi_var_common.c | 14 ++++++++++-- lib/efi_loader/efi_var_mem.c | 7 +++--- lib/efi_loader/efi_variable.c | 9 ++++---- lib/efi_loader/efi_variable_tee.c | 16 ++++++++----- 8 files changed, 69 insertions(+), 72 deletions(-) -- 2.32.0