From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30889 invoked by alias); 20 Sep 2019 15:52:50 -0000 Mailing-List: contact libabigail-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Id: List-Subscribe: Sender: libabigail-owner@sourceware.org Received: (qmail 30874 invoked by uid 89); 20 Sep 2019 15:52:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-17.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=sk:jenkins, 237,14, 23714, H*r:1001 X-Spam-Status: No, score=-17.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: relay5-d.mail.gandi.net Received: from relay5-d.mail.gandi.net (HELO relay5-d.mail.gandi.net) (217.70.183.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2019 15:52:47 +0000 X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodj@seketeli.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id B65CE1C0010 for ; Fri, 20 Sep 2019 15:52:44 +0000 (UTC) Received: by localhost (Postfix, from userid 1001) id 5DECB1A0865; Fri, 20 Sep 2019 17:52:43 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH] Guard testing v4.19+ AARCH64 kernel module loading for EL6 support Organization: Me, myself and I X-Operating-System: Red Hat Enterprise Linux Server 7.7 X-URL: http://www.seketeli.net/~dodji Date: Tue, 01 Jan 2019 00:00:00 -0000 Message-ID: <86impn55is.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00049.txt.bz2 Hello, A recent patch of mine broke the build on el6, again, sigh. Here is the breakage as reported by one of the autobuilders: https://jenkins-fedora-infra.apps.ci.centos.org/job/libabigail/label=EL6/651/console Basically, it says: FAIL: runtestreaddwarf (exit: 1) ================================ in get_ksymtab_format at: ../../src/abg-dwarf-reader.cc:7763: execution should not have reached this point! ABIs differ: /srv/jenkins/workspace/libabigail/label/EL6/build/../tests/data/test-read-dwarf/PR25007-sdhci.ko and: /srv/jenkins/workspace/libabigail/label/EL6/build/tests/output/test-read-dwarf/PR25007-sdhci.ko.abi This is basically due to the fact that to support analysing AARCH64 linux kernel binaries that contain R_AARCH64_ABS64 or R_AARCH64_PREL32 relocations, we need some an installed libelf that is recent enough to support these relocations. Otherwise, well, that test fails as above. I have thus applied the patch below to master and the build is now back to normal. ----------------------------------->8<------------------------------- When analyzing an AARCH64 linux kernel module built with support for either R_AARCH64_ABS64 or R_AARCH64_PREL32 relocations, we need these macros to be defined in elf.h (i.e a recent enough version of libelf), otherwise we cannot properly support those kernel modules using the scheme that uses the relocation table of the __ksymtab and __ksymtab_gpl sections to read those sections. In the future, I think we should automatically fallback to another way of trying to read those sections if those macros are not defined, and emit a message hinting at what is happening, when in verbose mode. I am keeping it as is for the moment, so that we can get a better case of the when these macros are not defined and whatnot. In the mean time, this patch conditionalizes the test that reads a kernel module build with support for these relocations to avoid running it on platform that support these relocations. * tests/test-read-dwarf.cc: Do not run the test on PR25007-sdhci.ko if the macros R_AARCH64_PREL32 and R_AARCH64_ABS64 are not defined. Signed-off-by: Dodji Seketeli --- tests/test-read-dwarf.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-read-dwarf.cc b/tests/test-read-dwarf.cc index 39505cb..f236296 100644 --- a/tests/test-read-dwarf.cc +++ b/tests/test-read-dwarf.cc @@ -237,12 +237,14 @@ InOutSpec in_out_specs[] = "data/test-read-dwarf/PR24378-fn-is-not-scope.abi", "output/test-read-dwarf/PR24378-fn-is-not-scope.abi", }, +#if defined(HAVE_R_AARCH64_ABS64_MACRO) && defined(HAVE_R_AARCH64_PREL32_MACRO) { "data/test-read-dwarf/PR25007-sdhci.ko", "", "data/test-read-dwarf/PR25007-sdhci.ko.abi", "output/test-read-dwarf/PR25007-sdhci.ko.abi", }, +#endif // This should be the last entry. {NULL, NULL, NULL, NULL} }; -- 1.8.3.1 ----------------------------------->8<------------------------------- -- Dodji