[B][C][SRU][PATCH 0/1] selftests/powerpc/pmu: Link ebb tests with -no-pie

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[B][C][SRU][PATCH 0/1] selftests/powerpc/pmu: Link ebb tests with -no-pie

Po-Hsu Lin (Sam)
BugLink: https://bugs.launchpad.net/bugs/1812805

== Justification ==
The selftests/powerpc/pmu/ebb test will fail on Ubunut PowerPC with:
   error while loading shared libraries: R_PPC64_ADDR16_HI reloc at
   0x00000f046fb04550 for symbol `' out of range

This is because the Ubuntu toolchain builds has PIE enabled by default.

== Fix ==
98415da0 (selftests/powerpc/pmu: Link ebb tests with -no-pie)

This fix will use -no-pie flag to build the test.

Patch already landed in Disco, and can be cherry-picked for B/C.
For Xenial, we don't have this test in our tree thus it can be ignored.

== Test ==
Patch verified on a Bionic P9 system, all the ebb tests will pass.

== Regression Potential ==
None.
This patchset is just for the kernel testing tool.

Joel Stanley (1):
  selftests/powerpc/pmu: Link ebb tests with -no-pie

 tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
 1 file changed, 3 insertions(+)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[B][C][SRU][PATCH 1/1] selftests/powerpc/pmu: Link ebb tests with -no-pie

Po-Hsu Lin (Sam)
From: Joel Stanley <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1812805

When running the ebb tests after building on a ppc64le Ubuntu machine:

 $ pmu/ebb/reg_access_test: error while loading shared libraries:
 R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
 range

This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.

Signed-off-by: Joel Stanley <[hidden email]>
Signed-off-by: Michael Ellerman <[hidden email]>
(cherry picked from commit 98415da03ae6559dc62899fd31e55e194779c45b)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index c4e64bc..2035100 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -5,6 +5,9 @@ noarg:
 # The EBB handler is 64-bit code and everything links against it
 CFLAGS += -m64
 
+# Toolchains may build PIE by default which breaks the assembly
+LDFLAGS += -no-pie
+
 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \
  cycles_with_freeze_test pmc56_overflow_test \
  ebb_vs_cpu_event_test cpu_event_vs_ebb_test \
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [B][C][SRU][PATCH 0/1] selftests/powerpc/pmu: Link ebb tests with -no-pie

Kleber Souza
In reply to this post by Po-Hsu Lin (Sam)
On 4/24/19 8:49 AM, Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1812805
>
> == Justification ==
> The selftests/powerpc/pmu/ebb test will fail on Ubunut PowerPC with:
>    error while loading shared libraries: R_PPC64_ADDR16_HI reloc at
>    0x00000f046fb04550 for symbol `' out of range
>
> This is because the Ubuntu toolchain builds has PIE enabled by default.
>
> == Fix ==
> 98415da0 (selftests/powerpc/pmu: Link ebb tests with -no-pie)
>
> This fix will use -no-pie flag to build the test.
>
> Patch already landed in Disco, and can be cherry-picked for B/C.
> For Xenial, we don't have this test in our tree thus it can be ignored.
>
> == Test ==
> Patch verified on a Bionic P9 system, all the ebb tests will pass.
>
> == Regression Potential ==
> None.
> This patchset is just for the kernel testing tool.
>
> Joel Stanley (1):
>   selftests/powerpc/pmu: Link ebb tests with -no-pie
>
>  tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
>  1 file changed, 3 insertions(+)
>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [B][C][SRU][PATCH 0/1] selftests/powerpc/pmu: Link ebb tests with -no-pie

Connor Kuehl
In reply to this post by Po-Hsu Lin (Sam)
On 4/23/19 11:49 PM, Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1812805
>
> == Justification ==
> The selftests/powerpc/pmu/ebb test will fail on Ubunut PowerPC with:
>    error while loading shared libraries: R_PPC64_ADDR16_HI reloc at
>    0x00000f046fb04550 for symbol `' out of range
>
> This is because the Ubuntu toolchain builds has PIE enabled by default.
>
> == Fix ==
> 98415da0 (selftests/powerpc/pmu: Link ebb tests with -no-pie)
>
> This fix will use -no-pie flag to build the test.
>
> Patch already landed in Disco, and can be cherry-picked for B/C.
> For Xenial, we don't have this test in our tree thus it can be ignored.
>
> == Test ==
> Patch verified on a Bionic P9 system, all the ebb tests will pass.
>
> == Regression Potential ==
> None.
> This patchset is just for the kernel testing tool.
>
> Joel Stanley (1):
>   selftests/powerpc/pmu: Link ebb tests with -no-pie
>
>  tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
>  1 file changed, 3 insertions(+)
>
Acked-by: Connor Kuehl <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

pEpkey.asc (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED: [B][C][SRU][PATCH 0/1] selftests/powerpc/pmu: Link ebb tests with -no-pie

Khaled Elmously
In reply to this post by Po-Hsu Lin (Sam)
On 2019-04-24 14:49:34 , Po-Hsu Lin wrote:

> BugLink: https://bugs.launchpad.net/bugs/1812805
>
> == Justification ==
> The selftests/powerpc/pmu/ebb test will fail on Ubunut PowerPC with:
>    error while loading shared libraries: R_PPC64_ADDR16_HI reloc at
>    0x00000f046fb04550 for symbol `' out of range
>
> This is because the Ubuntu toolchain builds has PIE enabled by default.
>
> == Fix ==
> 98415da0 (selftests/powerpc/pmu: Link ebb tests with -no-pie)
>
> This fix will use -no-pie flag to build the test.
>
> Patch already landed in Disco, and can be cherry-picked for B/C.
> For Xenial, we don't have this test in our tree thus it can be ignored.
>
> == Test ==
> Patch verified on a Bionic P9 system, all the ebb tests will pass.
>
> == Regression Potential ==
> None.
> This patchset is just for the kernel testing tool.
>
> Joel Stanley (1):
>   selftests/powerpc/pmu: Link ebb tests with -no-pie
>
>  tools/testing/selftests/powerpc/pmu/ebb/Makefile | 3 +++
>  1 file changed, 3 insertions(+)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team