Hello community,
here is the log from the commit of package skiboot for openSUSE:Factory checked in at 2019-02-13 10:04:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/skiboot (Old)
and /work/SRC/openSUSE:Factory/.skiboot.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "skiboot"
Wed Feb 13 10:04:37 2019 rev:13 rq:673570 version:5.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/skiboot/skiboot.changes 2019-02-01 11:48:25.880368507 +0100
+++ /work/SRC/openSUSE:Factory/.skiboot.new.28833/skiboot.changes 2019-02-13 10:04:50.585569369 +0100
@@ -1,0 +2,6 @@
+Mon Feb 11 15:35:26 UTC 2019 - Michal Suchanek
+
+- Fix opal-prd crash when building with -pie (bsc#1124931).
+ - add opal-prd-Fix-opal-prd-crash.patch
+
+-------------------------------------------------------------------
New:
----
opal-prd-Fix-opal-prd-crash.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ skiboot.spec ++++++
--- /var/tmp/diff_new_pack.BgsX9s/_old 2019-02-13 10:04:51.873569045 +0100
+++ /var/tmp/diff_new_pack.BgsX9s/_new 2019-02-13 10:04:51.877569044 +0100
@@ -28,6 +28,7 @@
Source: skiboot-%{version}.tar.gz
Patch1: hdata-i2c.c-fix-building-with-gcc8.patch
Patch2: libffs-fix-string-truncation.patch
+Patch3: opal-prd-Fix-opal-prd-crash.patch
BuildRequires: libopenssl-devel
BuildRequires: linux-glibc-devel
BuildRequires: systemd-rpm-macros
++++++ opal-prd-Fix-opal-prd-crash.patch ++++++
From ff576aa8187b47f61f902b6a097693d00c937d4c Mon Sep 17 00:00:00 2001
From: Vasant Hegde
Date: Mon, 30 Jul 2018 15:28:46 +0530
Subject: [PATCH] opal-prd: Fix opal-prd crash
Patch-mainline: v6.2-rc1
Git-commit: ff576aa8187b47f61f902b6a097693d00c937d4c
Presently callback function from HBRT uses r11 to point to target function
pointer. r12 is garbage. This works fine when we compile with "-no-pie" option
(as we don't use r12 to calculate TOC).
As per ABIv2 : "r12 : Function entry address at global entry point"
With "-pie" compilation option, we have to set r12 to point to global function
entry point. So that we can calculate TOC properly.
Crash log without this patch:
opal-prd[2864]: unhandled signal 11 at 0000000000029320 nip 00000 00102012830 lr 0000000102016890 code 1
Signed-off-by: Vasant Hegde
CC: Jeremy Kerr
CC: Mahesh Salgaonkar
Acked-by: Jeremy Kerr
Reviewed-by: Mahesh Salgaonkar
Signed-off-by: Stewart Smith
---
external/opal-prd/thunk.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/external/opal-prd/thunk.S b/external/opal-prd/thunk.S
index e09cef940099..d0ccd6491805 100644
--- a/external/opal-prd/thunk.S
+++ b/external/opal-prd/thunk.S
@@ -119,7 +119,7 @@ call_le:
std %r0,(32+16)(%r1)
/* Branch to original function */
- mtlr %r11
+ mtlr %r12
blrl
/* Restore stack and LR */
@@ -137,7 +137,7 @@ call_le:
/* Callback from HBRT. There is one entry point per function.
*
* We assume the proper r2 is already set via the OPD, so we grab our
- * target function pointer in r11 and jump to call_le
+ * target function pointer in r12 and jump to call_le
*/
#define CALLBACK_THUNK(name) \
.pushsection ".text","ax" ;\
@@ -146,7 +146,7 @@ name##_thunk: ;\
.long 0x00000038 | le_si16(__NR_switch_endian) ;\
/* byteswapped li %r0,__NR_switch_endian */ ;\
.long 0x02000044 /* byteswapped sc */ ;\
- ld %r11,name@got(%r2) ;\
+ ld %r12,name@got(%r2) ;\
b call_le ;\
.popsection ;\
.pushsection ".data.thunk_opd","aw" ;\
--
2.19.2