From patchwork Fri Jan 22 01:43:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 368607 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1078287jam; Thu, 21 Jan 2021 17:44:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRWtb9LkCgPVzT+Fb+0bYTEDuEebMUwTQySZNovhrg2WdoaFVDk4iY3aT+QT9hZJFr/DFP X-Received: by 2002:a17:906:958f:: with SMTP id r15mr1393593ejx.360.1611279846547; Thu, 21 Jan 2021 17:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611279846; cv=none; d=google.com; s=arc-20160816; b=AbHVzNf5Hljxp4yNjeikNJsok4CNqGpIZ6YKakX+yVA51uowdnzVZvP7ObncJnpPhb xuUZGKfcdplmEznLuMv99xRgy1hqjGEGgC4Dqu2aTsJKLU6ze9CsQIM++CLcLtLJYwvM 1KQLkYKp0dToH4PrCLbiaDdfAQDBpKnUmE4SKdOC3N5u9D+EPX54O8v5uDjR5bxdxHD1 rJlmPk+bxE7vSuMVlegYKDcuWitol+Tzfebp2tJK7Z4XjkLsdPX19r6qZGMoKPVIEEzo 5Vi6sVnOUwgQmhodcGADX/qzjzLtvLl/YeBITFFRfB67LTrjrkyk4xp1pRKJnjS3aF87 HzZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=Y8mxLLmQ0wUm3sV2S8sHZQmiOGpNRklPypO5prbcNqw=; b=kxyOVENDMdt+TiptAsg7O0l8rHFEphhg7RqWYqFpDrHgA9U1ZLCkN3m4Ez7CUNzcc/ YJzfMMSn8Qf8hReCdvJnt/DH5utBZmEDdUI4ewmRX1Bt4anEjK0IhJSkUsJj4rUxMV5g DDGus0K5fVTY50VpSF2N9K+RjyVKpuoJbI99GCooS4s5JtMilnWV8f3JtoQSaqHyZnk2 zkO4xY3eCcAcYPgMWFDjDLQfs0vvOVgf39z8A/LHqqqYW5oxYMwZ2+YZ9P5df/I9G2WI 3/1deOlJVJHSXc1OM7dYONDkt7d/dFGuWkQUXAgufy4e4NIncarJ1wENRRj9q7iITK5s zBXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p4ZSLCoy; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id go33si2413053ejc.40.2021.01.21.17.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 17:44:06 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p4ZSLCoy; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B4B4828C0; Fri, 22 Jan 2021 02:44:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="p4ZSLCoy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E93C828D6; Fri, 22 Jan 2021 02:44:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 23F428287F for ; Fri, 22 Jan 2021 02:44:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x433.google.com with SMTP id u67so2679745pfb.3 for ; Thu, 21 Jan 2021 17:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y8mxLLmQ0wUm3sV2S8sHZQmiOGpNRklPypO5prbcNqw=; b=p4ZSLCoy5QOPb9Ps+9Vpv9AfvXZT3ZetSMie4bYP0/BpWcporJ+cJCRfKgtlHb6SWF HObaTPEu5Sn9kedTj+kZ2e6u7VNc99RrMQYwEDC//7E3quFwiB8tmAscTxQbg/c+W5Mq dPpuxxPFIt8mzq9xeKWdE0Sey1z0xOeahGFjHeyf3W/PMhdZACgeIAA62NTfqAuj6rrV 7DEcCsLbe8H8y+DzyLBbZfFz+GhIJ0IDeXWnusRKvdfIlFeTqw1lyhI6/cAaL4gBUhp1 OVXomSX0m6TVp13f78HGRnsKrr6XZJ17eyusdIVSjNCHPEZmeDQLRCDa/ai9RhL+xNie CvMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y8mxLLmQ0wUm3sV2S8sHZQmiOGpNRklPypO5prbcNqw=; b=fjPBsSShfjs7KNsNonhqIPkIdAT0xZQ6Cn60MYYCvRk+k8wa7ERyPtwBfbKHnHfOsf T9s18GkyHfSBJQLUv9iOWhFor40Da1EwiylpNgkuOl/F9Ke3RPyyWXWvcR3ab3iuuBJt jXSWf5Su3mdSrQuxQpWyBlisQN8P0lAiwkOGS6adD7SnFsZzZfdzj8sf7XsZSO5xpLcw kdLmpJY9aCr1iTG0J58AyG8c9Q+L6dgEmnXR5tvHpds3HeqcEdmIyRDzY+8+OYQTNy/+ B7ktYNoP2Sp6LIGTN/BUbPgnapsrDtQyqBAuT47UGu+BCPpnaZzLvpvFA7DaNtZnoJ0f mZ5A== X-Gm-Message-State: AOAM531+r4Eu5027F1DuuNyAYACEzskfnAE0TWYRLURuy8UKRXfADBfi xMBuA5yRZ78xCfbgpSjkPjHjh+gNwBZYbA== X-Received: by 2002:a62:8787:0:b029:1bd:90f1:8502 with SMTP id i129-20020a6287870000b02901bd90f18502mr361332pfe.69.1611279839669; Thu, 21 Jan 2021 17:43:59 -0800 (PST) Received: from localhost.localdomain (p73a21355.tkyea130.ap.so-net.ne.jp. [115.162.19.85]) by smtp.gmail.com with ESMTPSA id j6sm6724216pfg.159.2021.01.21.17.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 17:43:58 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, xypron.glpk@gmx.de, agraf@csgraf.de Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH] tools: mkeficapsule: fill reserved members of structure Date: Fri, 22 Jan 2021 10:43:49 +0900 Message-Id: <20210122014349.20644-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean Fill reserved members of efi_firmware_management_capsule_image_header structure with zero's for safety. Signed-off-by: AKASHI Takahiro Fixes: CID 316354 --- tools/mkeficapsule.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.28.0 Reviewed-by: Heinrich Schuchardt diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index 270943fc90ae..36f693f09644 100644 --- a/tools/mkeficapsule.c +++ b/tools/mkeficapsule.c @@ -310,6 +310,9 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, image.version = 0x00000003; memcpy(&image.update_image_type_id, guid, sizeof(*guid)); image.update_image_index = index; + image.reserved[0] = 0; + image.reserved[1] = 0; + image.reserved[2] = 0; image.update_image_size = bin_stat.st_size; image.update_vendor_code_size = 0; /* none */ image.update_hardware_instance = instance;