From patchwork Sat May 30 04:47:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1301143 X-Patchwork-Delegate: xypron.glpk@gmx.de 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.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=abBsk9+o; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49YppB1vZrz9sPK for ; Sat, 30 May 2020 14:47:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F2FE810E0; Sat, 30 May 2020 06:47:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="abBsk9+o"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CBA5081521; Sat, 30 May 2020 06:47:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 578EE80679 for ; Sat, 30 May 2020 06:47:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590814047; bh=nZRnA11K8hskfboDwG8NVvYdT8YIoGpzVpEnuZSbbRk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=abBsk9+onkm4fwbVQg0n0Fte0AmGS9rtb3YSLGUpR6P/7x5Z2o8tJkeQLyQgDCi3K c3o4zW3AcbLzURjIknDxgAycqsXnoYKxvhvRx3SV081ErAt50z5lvoefUUtuDhR6Rb mCCP0a75M4uvE1PagSLJ3XYNbEF21I5wwv7xHFpU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([88.152.145.75]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MFsUp-1jmr5c0wcZ-00HRSR; Sat, 30 May 2020 06:47:27 +0200 From: Heinrich Schuchardt To: Alexander Graf Cc: AKASHI Takahiro , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 1/1] efi_loader: function description cmp_pe_section() Date: Sat, 30 May 2020 06:47:21 +0200 Message-Id: <20200530044721.28137-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:DWY/vj5HFYrrlkVEYI3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mSodArzMA4W6nPCD/fnMRWEiTXnX7XNu2Vie5VSJL6fr3rAwhArJwPv1KGMD6 oRGBsHCMA7kjB24cSXC6RQHc48uZACSbWpFLeusl8ocIPwqelhoeojsnJVhnt/ey5CtQ0Oy8R GlIjebWI0+ryUvztB2WsWfc+yQWWqfH9AfQlxVUKye34f8uVd7nyOqZes0gJ0n7W+8RHm7vCX Jlh+7VOQgGJCiCFa67QuYVTkeuqql4NRZRhUUqZ+66DEDnc0hlnJS/s9nDKvQsY0w/7ihY7hL x/oww1kWxwEwhwPCeSxtDSBH2TqC3acghSwNCM/frnQiAELQMX51I7Wo1L81OrOkfCAeU8IuW hC1M404QApMNvzNJwetbHdYHKHopXBoPkSe+3yO12ibq9/3u+elAgeebyDFGAas40JK9IR9uj xSfWSDGVJ257ca6rT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean Rework the description of function cmp_pe_section(). Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_image_loader.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -- 2.26.2 diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 9078d61980..d03bff8dcd 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -212,14 +212,16 @@ static void efi_set_code_and_data_type( #ifdef CONFIG_EFI_SECURE_BOOT /** - * cmp_pe_section() - compare two sections - * @arg1: Pointer to pointer to first section - * @arg2: Pointer to pointer to second section + * cmp_pe_section() - compare virtual addresses of two PE image sections + * @arg1: pointer to pointer to first section header + * @arg2: pointer to pointer to second section header * - * Compare two sections in PE image. + * Compare the virtual addresses of two sections of an portable executable. + * The arguments are defined as const void * to allow usage with qsort(). * - * Return: -1, 0, 1 respectively if arg1 < arg2, arg1 == arg2 or - * arg1 > arg2 + * Return: -1 if the virtual address of arg1 is less than that of arg2, + * 0 if the virtual addresses are equal, 1 if the virtual address + * of arg1 is greater than that of arg2. */ static int cmp_pe_section(const void *arg1, const void *arg2) {