Merge ~paelzer/ubuntu/+source/seabios:fix-1866870-FOCAL into ubuntu/+source/seabios:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 4286cbba52477bec0ce32ea968edb2152ebcd747
Merge reported by: Christian Ehrhardt 
Merged at revision: 4286cbba52477bec0ce32ea968edb2152ebcd747
Proposed branch: ~paelzer/ubuntu/+source/seabios:fix-1866870-FOCAL
Merge into: ubuntu/+source/seabios:ubuntu/focal-devel
Diff against target: 103 lines (+71/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch (+61/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+380881@code.launchpad.net
To post a comment you must log in.
4286cbb... by Christian Ehrhardt 

update-maintainer

Signed-off-by: Christian Ehrhardt <email address hidden>

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Preemptive +1 on the packaging side. Thanks for sending it upstream. If they come up with a different fix, one that doesn't require changing the gcc flag, we can apply that later.

Maybe just add somewhere the link to https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-fcf-protection, could be inthe patch, or in d/rules itself, or anywhere else you think it would be appropriate.

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Upstream only complained about the commit message but nothing more happened.
I'll upload the fix to unbreak focal.

I pinged Debian on IRC.
For an easy pick-up I provided https://salsa.debian.org/qemu-team/seabios/-/merge_requests/3

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/seabios
 * [new tag] upload/1.13.0-1ubuntu1 -> upload/1.13.0-1ubuntu1

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading seabios_1.13.0-1ubuntu1.dsc: done.
  Uploading seabios_1.13.0-1ubuntu1.debian.tar.xz: done.
  Uploading seabios_1.13.0-1ubuntu1_source.buildinfo: done.
  Uploading seabios_1.13.0-1ubuntu1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 477e60f..ce1378b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+seabios (1.13.0-1ubuntu1) focal; urgency=medium
7+
8+ * d/p/lp-1866870-build-use-fcf-protection-none-when-available.patch
9+ fix breakage on older chips due to fcf-protection (LP: #1866870)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 19 Mar 2020 13:10:10 +0100
12+
13 seabios (1.13.0-1) unstable; urgency=medium
14
15 * new upstream release 1.13.0 (Closes: #931346)
16diff --git a/debian/control b/debian/control
17index d66b3ea..de9bfa9 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: seabios
22 Section: misc
23 Priority: optional
24-Maintainer: Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Debian QEMU Team <pkg-qemu-devel@lists.alioth.debian.org>
27 Uploaders: Aurelien Jarno <aurel32@debian.org>,
28 Riku Voipio <riku.voipio@iki.fi>,
29 Michael Tokarev <mjt@tls.msk.ru>
30diff --git a/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch b/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch
31new file mode 100644
32index 0000000..a70317c
33--- /dev/null
34+++ b/debian/patches/lp-1866870-build-use-fcf-protection-none-when-available.patch
35@@ -0,0 +1,61 @@
36+From 7bc5e4dff67636adb76c2b59a15a082a060ff68f Mon Sep 17 00:00:00 2001
37+From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
38+Date: Thu, 19 Mar 2020 12:25:24 +0100
39+Subject: [PATCH] build: use -fcf-protection=none when available
40+
41+Some hardened gcc v9 compilers (such as the one in Ubuntu)
42+default this option which for seabios leads to emulation errors
43+when running in KVM (does not trigger in TCG) on older intel
44+chips of the Penryn generation (~2006-2008).
45+
46+Symptom in KVM looks like:
47+ KVM internal error. Suberror: 1
48+ emulation failure
49+ EAX=00000000 EBX=00000000 ECX=000086d4 EDX=00000000
50+ ESI=00000000 EDI=00000000 EBP=000086d4 ESP=00006d7c
51+ EIP=00007acf EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
52+ ES =0000 00000000 ffffffff 00809300
53+ CS =f000 000f0000 ffffffff 00809b00
54+ SS =0000 00000000 ffffffff 00809300
55+ DS =0000 00000000 ffffffff 00809300
56+ FS =0000 00000000 ffffffff 00809300
57+ GS =0000 00000000 ffffffff 00809300
58+ LDT=0000 00000000 0000ffff 00008200
59+ TR =0000 00000000 0000ffff 00008b00
60+ GDT= 000f6200 00000037
61+ IDT= 00000000 000003ff
62+ CR0=00000010 CR2=00000000 CR3=00000000 CR4=00000000
63+ DR0=0000000000000000 DR1=0000000000000000
64+ DR2=0000000000000000 DR3=0000000000000000
65+ DR6=00000000ffff0ff0 DR7=0000000000000400
66+ EFER=0000000000000000
67+ Code=b8 90 d9 00 00 66 e8 6b f7 ff ff 66 b8 0a 00 00
68+ 00 e9 61 f2 <f3> 0f 1e fb 66 57 66 56 66 53 66 53
69+ 66 89 c7 67 66 89 14 24 66 89 ce 66 e8 15 f8 ff ff 88
70+
71+URL: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1866870
72+Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
73+
74+Forwarded: yes (https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/IXAWMA2HWW75LSR3NBBYQKWT3TI5WVVP/)
75+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1866870
76+Last-Update: 2020-03-19
77+
78+---
79+ Makefile | 1 +
80+ 1 file changed, 1 insertion(+)
81+
82+diff --git a/Makefile b/Makefile
83+index 5f7d5370..9e8188e5 100644
84+--- a/Makefile
85++++ b/Makefile
86+@@ -69,6 +69,7 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
87+ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
88+ COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
89+ COMMONCFLAGS += $(call cc-option,$(CC),-Wno-address-of-packed-member,)
90++COMMONCFLAGS += $(call cc-option,$(CC),-fcf-protection=none,)
91+ COMMA := ,
92+
93+ CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
94+--
95+2.25.1
96+
97diff --git a/debian/patches/series b/debian/patches/series
98new file mode 100644
99index 0000000..5a7c60b
100--- /dev/null
101+++ b/debian/patches/series
102@@ -0,0 +1 @@
103+lp-1866870-build-use-fcf-protection-none-when-available.patch

Subscribers

People subscribed via source and target branches