1 |
commit: a5d779212b266be96f87f91cd5d468f50f3377c7 |
2 |
Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 30 12:20:47 2017 +0000 |
4 |
Commit: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 30 12:20:47 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a5d77921 |
7 |
|
8 |
Make sure -fstack-check isn't enabled bug #642268 |
9 |
|
10 |
0000_README | 4 ++ |
11 |
2902_Make-sure-fstack-check-isn-t-enabled.patch | 50 +++++++++++++++++++++++++ |
12 |
2 files changed, 54 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index 9111187..86c72af 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -119,6 +119,10 @@ Patch: 2901_tools-objtool-makefile-dont-assume-sync-checksh-is-executable.patch |
19 |
From: http://www.ozlabs.org/~akpm/mmotm/broken-out/tools-objtool-makefile-dont-assume-sync-checksh-is-executable.patch |
20 |
Desc: patch(1) loses the x bit. Kernel build breaks. |
21 |
|
22 |
+Patch: 2902_Make-sure-fstack-check-isn-t-enabled.patch |
23 |
+From: https://lkml.org/lkml/2017/12/29/488 |
24 |
+Desc: Make sure -fstack-check isn't enabled. |
25 |
+ |
26 |
Patch: 4200_fbcondecor.patch |
27 |
From: http://www.mepiscommunity.org/fbcondecor |
28 |
Desc: Bootsplash ported by Conrad Kostecki. (Bug #637434) |
29 |
|
30 |
diff --git a/2902_Make-sure-fstack-check-isn-t-enabled.patch b/2902_Make-sure-fstack-check-isn-t-enabled.patch |
31 |
new file mode 100644 |
32 |
index 0000000..50660b1 |
33 |
--- /dev/null |
34 |
+++ b/2902_Make-sure-fstack-check-isn-t-enabled.patch |
35 |
@@ -0,0 +1,50 @@ |
36 |
+From 4689f2971534dad4b6ce1a50aa9a616580272e07 Mon Sep 17 00:00:00 2001 |
37 |
+From: Alice Ferrazzi <alicef@g.o> |
38 |
+Date: Sat, 30 Dec 2017 12:11:39 +0000 |
39 |
+Subject: [PATCH] Make sure -fstack-check isn't enabled |
40 |
+ |
41 |
+On Fri, Dec 29, 2017 at 5:00 PM, Linus Torvalds |
42 |
+<torvalds@××××××××××××××××.org> wrote: |
43 |
+> |
44 |
+> Good. I was not feeling so happy about this bug report, but now I can |
45 |
+> firmly just blame the gentoo compiler for having some shit-for-brains |
46 |
+> "feature". |
47 |
+ |
48 |
+Looks like I can generate similar bad code with the F26 version of |
49 |
+gcc, it's just not enabled by default. |
50 |
+ |
51 |
+So all gentoo did was change the default options. |
52 |
+ |
53 |
+I suspect we should just add a |
54 |
+ |
55 |
+ KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) |
56 |
+ |
57 |
+ somewhere to the main Makefile, just to make sure. |
58 |
+ |
59 |
+ Maybe like the appended? |
60 |
+ |
61 |
+ Toralf, Alexander, does this make things JustWork(tm) for you? |
62 |
+ |
63 |
+ Linus |
64 |
+ |
65 |
+--- |
66 |
+ Makefile | 3 +++ |
67 |
+ 1 file changed, 3 insertions(+) |
68 |
+ |
69 |
+diff --git a/Makefile b/Makefile |
70 |
+index 9edfb78836a9..930fa93f397d 100644 |
71 |
+--- a/Makefile |
72 |
++++ b/Makefile |
73 |
+@@ -802,6 +802,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) |
74 |
+ # disable invalid "can't wrap" optimizations for signed / pointers |
75 |
+ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) |
76 |
+ |
77 |
++# Make sure -fstack-check isn't enabled (like gentoo apparently did) |
78 |
++KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) |
79 |
++ |
80 |
+ # conserve stack if available |
81 |
+ KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) |
82 |
+ |
83 |
+-- |
84 |
+2.13.6 |
85 |
+ |