Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1og4lz-00025H-18 for mharc-grub-devel@gnu.org; Wed, 05 Oct 2022 09:49:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og4lr-00020W-Et for grub-devel@gnu.org; Wed, 05 Oct 2022 09:49:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og4lp-0000Fc-Vq for grub-devel@gnu.org; Wed, 05 Oct 2022 09:49:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664977748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cHDja7YunTmVaOhWutrvmkMuNlaFtTYuLfLpT+76v00=; b=FkBWIEYZO2z/L4/hIBdQUs89sSPhTCBUo2A2x43IsSl1af9RK/sOfsCOcJSP3lKepNcFGT tWc/dR28gIFYmdpsMSZ4fptdTWUFnygD9+KSkDWzUb6cOkprTGpSCjUpeqePZ6oewyytWa 8dZjjVLhWitJuSDE+pWGwvlxFVlTHZw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-670-rdSuf-MFMoqv3bNdxGewhQ-1; Wed, 05 Oct 2022 09:48:57 -0400 X-MC-Unique: rdSuf-MFMoqv3bNdxGewhQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E1661C004FB; Wed, 5 Oct 2022 13:48:56 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.34.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68F08112131E; Wed, 5 Oct 2022 13:48:44 +0000 (UTC) From: Robbie Harwood To: grub-devel@gnu.org Cc: Robbie Harwood , dkiper@net-space.pl Subject: [PATCH v5 0/1] grub-module-verifierxx.c: enable running standalone checkers Date: Wed, 5 Oct 2022 09:48:36 -0400 Message-Id: <20221005134837.3840-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Received-SPF: pass client-ip=170.10.133.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2022 13:49:17 -0000 (Resend since not all changes were in v4 that were supposed to be.) Address Daniel's comments on v2/v3. In particular, gcc (Debian 12.2.0-3) only warns when the redefinition is to a different value. It gets confused by the space, so just remove it. This causes gcc -x c -fsyntax-only -Iinclude -I. util/grub-module-verifierXX.c to build without warnings. Interdiff attached. Peter Jones (1): grub-module-verifierxx.c: enable running standalone checkers include/grub/elf.h | 4 ++-- util/grub-module-verifier32.c | 2 ++ util/grub-module-verifier64.c | 2 ++ util/grub-module-verifierXX.c | 9 +++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) Interdiff against v3: diff --git a/include/grub/elf.h b/include/grub/elf.h index 0e70651d4b..e6f073bc90 100644 --- a/include/grub/elf.h +++ b/include/grub/elf.h @@ -2593,8 +2593,8 @@ typedef Elf64_Word Elf_Word; typedef Elf64_Xword Elf_Xword; typedef Elf64_Shnum Elf_Shnum; -#define ELF_ST_BIND(val) ELF64_ST_BIND (val) -#define ELF_ST_TYPE(val) ELF64_ST_TYPE (val) +#define ELF_ST_BIND(val) ELF64_ST_BIND(val) +#define ELF_ST_TYPE(val) ELF64_ST_TYPE(val) #define ELF_ST_INFO(a,b) ELF64_ST_INFO(a,b) #define ELF_R_SYM(val) ELF64_R_SYM(val) #define ELF_R_TYPE(val) ELF64_R_TYPE(val) -- 2.35.1