From: Dodji Seketeli <dodji@seketeli.org>
To: libabigail@sourceware.org
Subject: [PATCH] Guard testing v4.19+ AARCH64 kernel module loading for EL6 support
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <86impn55is.fsf@seketeli.org> (raw)
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 <dodji@redhat.com>
---
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
next reply other threads:[~2019-09-20 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 0:00 Dodji Seketeli [this message]
2019-01-01 0:00 ` Matthias Maennich via libabigail
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86impn55is.fsf@seketeli.org \
--to=dodji@seketeli.org \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).