* Re: [PATCH] Guard testing v4.19+ AARCH64 kernel module loading for EL6 support
2019-01-01 0:00 [PATCH] Guard testing v4.19+ AARCH64 kernel module loading for EL6 support Dodji Seketeli
@ 2019-01-01 0:00 ` Matthias Maennich via libabigail
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Maennich via libabigail @ 2019-01-01 0:00 UTC (permalink / raw)
To: Dodji Seketeli; +Cc: libabigail
On Fri, Sep 20, 2019 at 05:52:43PM +0200, Dodji Seketeli wrote:
>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<-------------------------------
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Guard testing v4.19+ AARCH64 kernel module loading for EL6 support
@ 2019-01-01 0:00 Dodji Seketeli
2019-01-01 0:00 ` Matthias Maennich via libabigail
0 siblings, 1 reply; 2+ messages in thread
From: Dodji Seketeli @ 2019-01-01 0:00 UTC (permalink / raw)
To: libabigail
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-20 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [PATCH] Guard testing v4.19+ AARCH64 kernel module loading for EL6 support Dodji Seketeli
2019-01-01 0:00 ` Matthias Maennich via libabigail
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).