1 |
commit: f45fc759ee4bac87fcdb6bc790a221205aa3eb5a |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 5 20:29:14 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 5 20:29:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f45fc759 |
7 |
|
8 |
8.5.0: backport linux/cyclades.h include removal |
9 |
|
10 |
Upstream sanitizer commit commit: https://reviews.llvm.org/D102059 |
11 |
|
12 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
13 |
|
14 |
8.5.0/gentoo/30_all_remove-cyclades.patch | 108 ++++++++++++++++++++++++++++++ |
15 |
8.5.0/gentoo/README.history | 3 + |
16 |
2 files changed, 111 insertions(+) |
17 |
|
18 |
diff --git a/8.5.0/gentoo/30_all_remove-cyclades.patch b/8.5.0/gentoo/30_all_remove-cyclades.patch |
19 |
new file mode 100644 |
20 |
index 0000000..f386c52 |
21 |
--- /dev/null |
22 |
+++ b/8.5.0/gentoo/30_all_remove-cyclades.patch |
23 |
@@ -0,0 +1,108 @@ |
24 |
+From 68d5235cb58f988c71b403334cd9482d663841ab Mon Sep 17 00:00:00 2001 |
25 |
+From: Tamar Christina <tamar.christina@×××.com> |
26 |
+Date: Thu, 20 May 2021 18:55:11 +0100 |
27 |
+Subject: [PATCH] libsanitizer: Remove cyclades inclusion in sanitizer |
28 |
+ |
29 |
+The Linux kernel has removed the interface to cyclades from |
30 |
+the latest kernel headers[1] due to them being orphaned for the |
31 |
+past 13 years. |
32 |
+ |
33 |
+libsanitizer uses this header when compiling against glibc, but |
34 |
+glibcs itself doesn't seem to have any references to cyclades. |
35 |
+ |
36 |
+Further more it seems that the driver is broken in the kernel and |
37 |
+the firmware doesn't seem to be available anymore. |
38 |
+ |
39 |
+As such since this is breaking the build of libsanitizer (and so the |
40 |
+GCC bootstrap[2]) I propose to remove this. |
41 |
+ |
42 |
+[1] https://lkml.org/lkml/2021/3/2/153 |
43 |
+[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379 |
44 |
+ |
45 |
+Reviewed By: eugenis |
46 |
+ |
47 |
+Differential Revision: https://reviews.llvm.org/D102059 |
48 |
+--- |
49 |
+ .../sanitizer_common_interceptors_ioctl.inc | 9 --------- |
50 |
+ .../sanitizer_platform_limits_posix.cpp | 11 ----------- |
51 |
+ .../sanitizer_platform_limits_posix.h | 10 ---------- |
52 |
+ 3 files changed, 30 deletions(-) |
53 |
+ |
54 |
+--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
55 |
++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc |
56 |
+@@ -358,15 +358,6 @@ static void ioctl_table_fill() { |
57 |
+ |
58 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
59 |
+ // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE |
60 |
+- _(CYGETDEFTHRESH, WRITE, sizeof(int)); |
61 |
+- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); |
62 |
+- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); |
63 |
+- _(CYGETTHRESH, WRITE, sizeof(int)); |
64 |
+- _(CYGETTIMEOUT, WRITE, sizeof(int)); |
65 |
+- _(CYSETDEFTHRESH, NONE, 0); |
66 |
+- _(CYSETDEFTIMEOUT, NONE, 0); |
67 |
+- _(CYSETTHRESH, NONE, 0); |
68 |
+- _(CYSETTIMEOUT, NONE, 0); |
69 |
+ _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); |
70 |
+ _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); |
71 |
+ _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); |
72 |
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
73 |
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc |
74 |
+@@ -150,7 +150,6 @@ typedef struct user_fpregs elf_fpregset_t; |
75 |
+ # include <sys/procfs.h> |
76 |
+ #endif |
77 |
+ #include <sys/user.h> |
78 |
+-#include <linux/cyclades.h> |
79 |
+ #include <linux/if_eql.h> |
80 |
+ #include <linux/if_plip.h> |
81 |
+ #include <linux/lp.h> |
82 |
+@@ -445,7 +444,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
83 |
+ |
84 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
85 |
+ unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); |
86 |
+- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); |
87 |
+ #if EV_VERSION > (0x010000) |
88 |
+ unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); |
89 |
+ #else |
90 |
+@@ -812,15 +810,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); |
91 |
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
92 |
+ |
93 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
94 |
+- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; |
95 |
+- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; |
96 |
+- unsigned IOCTL_CYGETMON = CYGETMON; |
97 |
+- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; |
98 |
+- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; |
99 |
+- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; |
100 |
+- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; |
101 |
+- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; |
102 |
+- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; |
103 |
+ unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; |
104 |
+ unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; |
105 |
+ unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; |
106 |
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h |
107 |
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h |
108 |
+@@ -956,7 +956,6 @@ struct __sanitizer_cookie_io_functions_t { |
109 |
+ |
110 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
111 |
+ extern unsigned struct_ax25_parms_struct_sz; |
112 |
+- extern unsigned struct_cyclades_monitor_sz; |
113 |
+ extern unsigned struct_input_keymap_entry_sz; |
114 |
+ extern unsigned struct_ipx_config_data_sz; |
115 |
+ extern unsigned struct_kbdiacrs_sz; |
116 |
+@@ -1301,15 +1300,6 @@ struct __sanitizer_cookie_io_functions_t { |
117 |
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
118 |
+ |
119 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
120 |
+- extern unsigned IOCTL_CYGETDEFTHRESH; |
121 |
+- extern unsigned IOCTL_CYGETDEFTIMEOUT; |
122 |
+- extern unsigned IOCTL_CYGETMON; |
123 |
+- extern unsigned IOCTL_CYGETTHRESH; |
124 |
+- extern unsigned IOCTL_CYGETTIMEOUT; |
125 |
+- extern unsigned IOCTL_CYSETDEFTHRESH; |
126 |
+- extern unsigned IOCTL_CYSETDEFTIMEOUT; |
127 |
+- extern unsigned IOCTL_CYSETTHRESH; |
128 |
+- extern unsigned IOCTL_CYSETTIMEOUT; |
129 |
+ extern unsigned IOCTL_EQL_EMANCIPATE; |
130 |
+ extern unsigned IOCTL_EQL_ENSLAVE; |
131 |
+ extern unsigned IOCTL_EQL_GETMASTRCFG; |
132 |
|
133 |
diff --git a/8.5.0/gentoo/README.history b/8.5.0/gentoo/README.history |
134 |
index adde7ee..2587352 100644 |
135 |
--- a/8.5.0/gentoo/README.history |
136 |
+++ b/8.5.0/gentoo/README.history |
137 |
@@ -1,3 +1,6 @@ |
138 |
+2 TODO |
139 |
+ + 30_all_remove-cyclades.patch |
140 |
+ |
141 |
1 16 May 2021 |
142 |
+ 01_all_default-fortify-source.patch |
143 |
+ 02_all_default-warn-format-security.patch |