From patchwork Wed Sep 22 10:32:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 1531163 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=QEQ54Cg2; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HDvk56RcNz9sW4 for ; Wed, 22 Sep 2021 20:32:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mSzXu-0001hh-PZ; Wed, 22 Sep 2021 10:32:10 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mSzXs-0001hJ-It for fwts-devel@lists.ubuntu.com; Wed, 22 Sep 2021 10:32:08 +0000 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 54D503F104; Wed, 22 Sep 2021 10:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632306728; bh=nbq+09IB0/00mu9N+Jc+lUA/qTvBBVeReZPQCj/3PHU=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=QEQ54Cg20t+kauP8NtRWfRjpgGYmCAIPIY2F7AgGYu1eJGQAfiFH+ON8yyG2eyfeh I/UOK0J7mjOHl0R8LWxG1V/dmiKOIj+unWOpXKx4/NgrgHdm/6PewTbmpgCLHgwaN+ HAO/YcpJZX1v0BaVkRQEKfpKrvvxDH4oep5tol8Qmj1ammyUlTnZSCIuHbOH6fBSWb ZRxGBSuZngFgRQaRTZXmahqPWOMqIhbcw/6XC/+jkrbb4ra5DPZdXbuOA6kg3iMCVV gEGqcX/O+fVMvocdXX3O2A5z1itlsrAVI4A6CY93mb6SWI6cqmbAhe0SDLXN+Kn8Jc NiC/IrUyp5PHA== From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] uefi: securebootcert: make some function arguments const Date: Wed, 22 Sep 2021 11:32:08 +0100 Message-Id: <20210922103208.178578-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King A couple of function arguments can be consified, cleans up cppcheck style warnings. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/uefi/securebootcert/securebootcert.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uefi/securebootcert/securebootcert.c b/src/uefi/securebootcert/securebootcert.c index 7a0366ea..39ff1ebb 100644 --- a/src/uefi/securebootcert/securebootcert.c +++ b/src/uefi/securebootcert/securebootcert.c @@ -263,7 +263,11 @@ static inline bool check_addr_overflow( return (len > ~(uintptr_t)0 - (uintptr_t)var_data_addr); } -static bool check_sigdb_presence(uint8_t *var_data, size_t datalen, uint8_t *key, uint32_t key_len) +static bool check_sigdb_presence( + uint8_t *var_data, + const size_t datalen, + const uint8_t *key, + const uint32_t key_len) { uint8_t *var_data_addr; EFI_SIGNATURE_LIST siglist;