From patchwork Mon Jun 21 08:26:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Axtens X-Patchwork-Id: 1494942 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=axtens.net header.i=@axtens.net header.a=rsa-sha256 header.s=google header.b=kmJWQYSo; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G7jLj5vKRz9sWQ for ; Mon, 21 Jun 2021 18:27:09 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G7jLk3QSmz306c for ; Mon, 21 Jun 2021 18:27:10 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=axtens.net header.i=@axtens.net header.a=rsa-sha256 header.s=google header.b=kmJWQYSo; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=axtens.net (client-ip=2607:f8b0:4864:20::1035; helo=mail-pj1-x1035.google.com; envelope-from=dja@axtens.net; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=axtens.net header.i=@axtens.net header.a=rsa-sha256 header.s=google header.b=kmJWQYSo; dkim-atps=neutral Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4G7jLX37tfz3089 for ; Mon, 21 Jun 2021 18:27:00 +1000 (AEST) Received: by mail-pj1-x1035.google.com with SMTP id k5so9506942pjj.1 for ; Mon, 21 Jun 2021 01:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/aEQ9xzBWtBAxoxnmVlXOq3xzLR1sUKZjUnxGiDhrAU=; b=kmJWQYSoR5bd8enSDtUYl94+ax6I84ZmS4CE2/hYRmwfibr0iDFSLMl25m9AxRGeVt MfyGjxDUwQhAisSD5VkPcfvrLGKtWbnqmkBFtRHrPc2GIYDuDOZ0aVzC5UXnJdBiKmx1 jT9iWx5TsVEtkiK4Ai5qIXpSy/cnNGUDCNkZc= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/aEQ9xzBWtBAxoxnmVlXOq3xzLR1sUKZjUnxGiDhrAU=; b=HomWgUIyD5Mb+NZhXTrLO9kmaFXKXZRxM0uP2xl0bb/jaIeAADARUE/Sqjwee6gp3H yRuv8wnzlbJ/zr1bZ+ZJlfYqJDM+3RfWlqTCGI4N4aMBzgJJZcolOKa46FPoqwY6EheL c5WWxFAtXJb5VotkgzIuPkRS8R/fKrj7U8diIrjc/dglRxxbTdirsCnkS8w2uF6PA/kS ArFtrfA/msTOmXicVgYTyLczDWBeiu5KxuTm/Vt23EVIpzchKYfwIlgo8fXDbJtPShsB CitvkRcKJ954aoIHksr5fuvwqOlJBdL9i+a/SfMqTeEWaSIWcz7MgbhOZPec36937Ppl aBxg== X-Gm-Message-State: AOAM530VaM1aDvipIdcmo1ejiC403+Dph3ciYU+CKPMcEaI9y3Det2fz EbKQsAqUqbF/te6VC/LAphkh5IzalcJOLw== X-Google-Smtp-Source: ABdhPJyKEKkpQ74pSSwz8ZsxLclOlvT9OOiWeftmswoHQzEDRz9akeQkD74/WC6EQo/KOT+3VWhynQ== X-Received: by 2002:a17:902:6b82:b029:120:3404:ce99 with SMTP id p2-20020a1709026b82b02901203404ce99mr16899963plk.49.1624264017168; Mon, 21 Jun 2021 01:26:57 -0700 (PDT) Received: from localhost ([203.206.29.204]) by smtp.gmail.com with ESMTPSA id d189sm7684826pfa.28.2021.06.21.01.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 01:26:56 -0700 (PDT) From: Daniel Axtens To: skiboot@lists.ozlabs.org Date: Mon, 21 Jun 2021 18:26:39 +1000 Message-Id: <20210621082641.26476-4-dja@axtens.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210621082641.26476-1-dja@axtens.net> References: <20210621082641.26476-1-dja@axtens.net> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 3/5] secvar/backend: fix comment of get_hash_to_verify X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nick.child@ibm.com, nayna@linux.ibm.com Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" get_hash_to_verify claims to return a negative error code in the case of error. It actually returns NULL. Fix the comment. Signed-off-by: Daniel Axtens Reviewed-by: Nick Child --- libstb/secvar/backend/edk2-compat-process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstb/secvar/backend/edk2-compat-process.c b/libstb/secvar/backend/edk2-compat-process.c index b39f35e0c3dc..3ef3cf73c8f7 100644 --- a/libstb/secvar/backend/edk2-compat-process.c +++ b/libstb/secvar/backend/edk2-compat-process.c @@ -572,7 +572,7 @@ static int verify_signature(const struct efi_variable_authentication_2 *auth, * Create the hash of the buffer * name || vendor guid || attributes || timestamp || newcontent * which is submitted as signed by the user. - * Returns the sha256 hash, else negative error code. + * Returns the sha256 hash, else NULL. */ static char *get_hash_to_verify(const char *key, const char *new_data, const size_t new_data_size,