1 |
vapier 07/10/10 20:13:55 |
2 |
|
3 |
Added: 35_all_gdb-6.3-security-errata-20050610.patch |
4 |
45_all_gdb-hppa-offsets.patch |
5 |
80_all_gdb-6.5-dwarf-stack-overflow.patch |
6 |
README.history |
7 |
Log: |
8 |
initial 6.7 patchset based on last 6.6 patchset |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 src/patchsets/gdb/6.7/35_all_gdb-6.3-security-errata-20050610.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/35_all_gdb-6.3-security-errata-20050610.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/35_all_gdb-6.3-security-errata-20050610.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: 35_all_gdb-6.3-security-errata-20050610.patch |
17 |
=================================================================== |
18 |
2005-06-09 Jeff Johnston <jjohnstn@××××××.com> |
19 |
|
20 |
* gdb.base/gdbinit.exp: New testcase. |
21 |
* gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp. |
22 |
|
23 |
2005-06-08 Daniel Jacobowitz <dan@××××××××××××.com> |
24 |
Jeff Johnston <jjohnstn@××××××.com> |
25 |
|
26 |
* Makefile.in (cli-cmds.o): Update. |
27 |
* configure.in: Add check for getuid. |
28 |
* configure: Regenerated. |
29 |
* config.in: Ditto. |
30 |
* main.c (captured_main): Pass -1 to source_command when loading |
31 |
gdbinit files. |
32 |
* cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>. |
33 |
(source_command): Update documentation. Check permissions if |
34 |
FROM_TTY is -1. |
35 |
|
36 |
Index: gdb-6.6/gdb/cli/cli-cmds.c |
37 |
=================================================================== |
38 |
--- gdb-6.6.orig/gdb/cli/cli-cmds.c |
39 |
+++ gdb-6.6/gdb/cli/cli-cmds.c |
40 |
@@ -38,6 +38,7 @@ |
41 |
#include "objfiles.h" |
42 |
#include "source.h" |
43 |
#include "disasm.h" |
44 |
+#include "gdb_stat.h" |
45 |
|
46 |
#include "ui-out.h" |
47 |
|
48 |
@@ -461,12 +462,31 @@ source_script (char *file, int from_tty) |
49 |
|
50 |
if (fd == -1) |
51 |
{ |
52 |
- if (from_tty) |
53 |
+ if (from_tty > 0) |
54 |
perror_with_name (file); |
55 |
else |
56 |
return; |
57 |
} |
58 |
|
59 |
+#ifdef HAVE_GETUID |
60 |
+ if (from_tty == -1) |
61 |
+ { |
62 |
+ struct stat statbuf; |
63 |
+ if (fstat (fd, &statbuf) < 0) |
64 |
+ { |
65 |
+ perror_with_name (file); |
66 |
+ close (fd); |
67 |
+ return; |
68 |
+ } |
69 |
+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH)) |
70 |
+ { |
71 |
+ warning (_("not using untrusted file \"%s\""), file); |
72 |
+ close (fd); |
73 |
+ return; |
74 |
+ } |
75 |
+ } |
76 |
+#endif |
77 |
+ |
78 |
stream = fdopen (fd, FOPEN_RT); |
79 |
script_from_file (stream, file); |
80 |
|
81 |
Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp |
82 |
=================================================================== |
83 |
--- /dev/null |
84 |
+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp |
85 |
@@ -0,0 +1,98 @@ |
86 |
+# Copyright 2005 |
87 |
+# Free Software Foundation, Inc. |
88 |
+ |
89 |
+# This program is free software; you can redistribute it and/or modify |
90 |
+# it under the terms of the GNU General Public License as published by |
91 |
+# the Free Software Foundation; either version 2 of the License, or |
92 |
+# (at your option) any later version. |
93 |
+# |
94 |
+# This program is distributed in the hope that it will be useful, |
95 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
96 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
97 |
+# GNU General Public License for more details. |
98 |
+# |
99 |
+# You should have received a copy of the GNU General Public License |
100 |
+# along with this program; if not, write to the Free Software |
101 |
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
102 |
+ |
103 |
+# Please email any bugs, comments, and/or additions to this file to: |
104 |
+# bug-gdb@×××××××××××.edu |
105 |
+ |
106 |
+# This file was written by Jeff Johnston <jjohnstn@××××××.com>. |
107 |
+ |
108 |
+if $tracelevel then { |
109 |
+ strace $tracelevel |
110 |
+} |
111 |
+ |
112 |
+set prms_id 0 |
113 |
+set bug_id 0 |
114 |
+ |
115 |
+# are we on a target board |
116 |
+if [is_remote target] { |
117 |
+ return |
118 |
+} |
119 |
+ |
120 |
+ |
121 |
+global verbose |
122 |
+global GDB |
123 |
+global GDBFLAGS |
124 |
+global gdb_prompt |
125 |
+global timeout |
126 |
+global gdb_spawn_id; |
127 |
+ |
128 |
+gdb_stop_suppressing_tests; |
129 |
+ |
130 |
+verbose "Spawning $GDB -nw" |
131 |
+ |
132 |
+if [info exists gdb_spawn_id] { |
133 |
+ return 0; |
134 |
+} |
135 |
+ |
136 |
+if ![is_remote host] { |
137 |
+ if { [which $GDB] == 0 } then { |
138 |
+ perror "$GDB does not exist." |
139 |
+ exit 1 |
140 |
+ } |
141 |
+} |
142 |
+ |
143 |
+set env(HOME) [pwd] |
144 |
+remote_exec build "rm .gdbinit" |
145 |
+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit" |
146 |
+remote_exec build "chmod 646 .gdbinit" |
147 |
+ |
148 |
+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; |
149 |
+if { $res < 0 || $res == "" } { |
150 |
+ perror "Spawning $GDB failed." |
151 |
+ return 1; |
152 |
+} |
153 |
+gdb_expect 360 { |
154 |
+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { |
155 |
+ pass "untrusted .gdbinit caught." |
156 |
+ } |
157 |
+ -re "$gdb_prompt $" { |
158 |
+ fail "untrusted .gdbinit caught." |
159 |
+ } |
160 |
+ timeout { |
161 |
+ fail "(timeout) untrusted .gdbinit caught." |
162 |
+ } |
163 |
+} |
164 |
+ |
165 |
+remote_exec build "chmod 644 .gdbinit" |
166 |
+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; |
167 |
+if { $res < 0 || $res == "" } { |
168 |
+ perror "Spawning $GDB failed." |
169 |
+ return 1; |
170 |
+} |
171 |
+gdb_expect 360 { |
172 |
+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { |
173 |
+ fail "trusted .gdbinit allowed." |
174 |
+ } |
175 |
+ -re "in gdbinit.*$gdb_prompt $" { |
176 |
+ pass "trusted .gdbinit allowed." |
177 |
+ } |
178 |
+ timeout { |
179 |
+ fail "(timeout) trusted .gdbinit allowed." |
180 |
+ } |
181 |
+} |
182 |
+ |
183 |
+remote_exec build "rm .gdbinit" |
184 |
Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample |
185 |
=================================================================== |
186 |
--- /dev/null |
187 |
+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample |
188 |
@@ -0,0 +1 @@ |
189 |
+echo "\nin gdbinit" |
190 |
Index: gdb-6.6/gdb/main.c |
191 |
=================================================================== |
192 |
--- gdb-6.6.orig/gdb/main.c |
193 |
+++ gdb-6.6/gdb/main.c |
194 |
@@ -644,7 +644,7 @@ extern int gdbtk_test (char *); |
195 |
|
196 |
if (!inhibit_gdbinit) |
197 |
{ |
198 |
- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL); |
199 |
+ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL); |
200 |
} |
201 |
|
202 |
/* Do stats; no need to do them elsewhere since we'll only |
203 |
@@ -722,7 +722,7 @@ extern int gdbtk_test (char *); |
204 |
|| memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) |
205 |
if (!inhibit_gdbinit) |
206 |
{ |
207 |
- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL); |
208 |
+ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL); |
209 |
} |
210 |
|
211 |
for (i = 0; i < ncmd; i++) |
212 |
Index: gdb-6.6/gdb/Makefile.in |
213 |
=================================================================== |
214 |
--- gdb-6.6.orig/gdb/Makefile.in |
215 |
+++ gdb-6.6/gdb/Makefile.in |
216 |
@@ -2927,7 +2927,7 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(d |
217 |
$(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ |
218 |
$(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ |
219 |
$(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ |
220 |
- $(tui_h) |
221 |
+ $(tui_h) $(gdb_stat_h) |
222 |
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c |
223 |
cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ |
224 |
$(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \ |
225 |
|
226 |
|
227 |
|
228 |
1.1 src/patchsets/gdb/6.7/45_all_gdb-hppa-offsets.patch |
229 |
|
230 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/45_all_gdb-hppa-offsets.patch?rev=1.1&view=markup |
231 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/45_all_gdb-hppa-offsets.patch?rev=1.1&content-type=text/plain |
232 |
|
233 |
Index: 45_all_gdb-hppa-offsets.patch |
234 |
=================================================================== |
235 |
sanitized headers dont include asm/offsets.h, so cache a local copy |
236 |
|
237 |
http://bugs.gentoo.org/180476 |
238 |
http://lists.parisc-linux.org/pipermail/parisc-linux/2007-February/031162.html |
239 |
|
240 |
--- gdb/hppa-linux-nat.c |
241 |
+++ gdb/hppa-linux-nat.c |
242 |
@@ -34,7 +34,7 @@ |
243 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,43) |
244 |
#include <asm/offset.h> |
245 |
#else |
246 |
-#include <asm/offsets.h> |
247 |
+#include <hppa-offsets.h> |
248 |
#endif |
249 |
|
250 |
#include "hppa-tdep.h" |
251 |
--- gdb/hppa-offsets.h |
252 |
+++ gdb/hppa-offsets.h |
253 |
@@ -0,0 +1,248 @@ |
254 |
+#ifndef __ASM_OFFSETS_H__ |
255 |
+#define __ASM_OFFSETS_H__ |
256 |
+/* |
257 |
+ * DO NOT MODIFY. |
258 |
+ * |
259 |
+ * This file was generated by arch/parisc/Makefile |
260 |
+ * |
261 |
+ */ |
262 |
+ |
263 |
+#define TASK_THREAD_INFO 4 /* offsetof(struct task_struct, thread_info) */ |
264 |
+#define TASK_STATE 0 /* offsetof(struct task_struct, state) */ |
265 |
+#define TASK_FLAGS 12 /* offsetof(struct task_struct, flags) */ |
266 |
+#define TASK_SIGPENDING 1188 /* offsetof(struct task_struct, pending) */ |
267 |
+#define TASK_PTRACE 16 /* offsetof(struct task_struct, ptrace) */ |
268 |
+#define TASK_MM 108 /* offsetof(struct task_struct, mm) */ |
269 |
+#define TASK_PERSONALITY 132 /* offsetof(struct task_struct, personality) */ |
270 |
+#define TASK_PID 140 /* offsetof(struct task_struct, pid) */ |
271 |
+ |
272 |
+#define TASK_REGS 664 /* offsetof(struct task_struct, thread.regs) */ |
273 |
+#define TASK_PT_PSW 664 /* offsetof(struct task_struct, thread.regs.gr[ 0]) */ |
274 |
+#define TASK_PT_GR1 668 /* offsetof(struct task_struct, thread.regs.gr[ 1]) */ |
275 |
+#define TASK_PT_GR2 672 /* offsetof(struct task_struct, thread.regs.gr[ 2]) */ |
276 |
+#define TASK_PT_GR3 676 /* offsetof(struct task_struct, thread.regs.gr[ 3]) */ |
277 |
+#define TASK_PT_GR4 680 /* offsetof(struct task_struct, thread.regs.gr[ 4]) */ |
278 |
+#define TASK_PT_GR5 684 /* offsetof(struct task_struct, thread.regs.gr[ 5]) */ |
279 |
+#define TASK_PT_GR6 688 /* offsetof(struct task_struct, thread.regs.gr[ 6]) */ |
280 |
+#define TASK_PT_GR7 692 /* offsetof(struct task_struct, thread.regs.gr[ 7]) */ |
281 |
+#define TASK_PT_GR8 696 /* offsetof(struct task_struct, thread.regs.gr[ 8]) */ |
282 |
+#define TASK_PT_GR9 700 /* offsetof(struct task_struct, thread.regs.gr[ 9]) */ |
283 |
+#define TASK_PT_GR10 704 /* offsetof(struct task_struct, thread.regs.gr[10]) */ |
284 |
+#define TASK_PT_GR11 708 /* offsetof(struct task_struct, thread.regs.gr[11]) */ |
285 |
+#define TASK_PT_GR12 712 /* offsetof(struct task_struct, thread.regs.gr[12]) */ |
286 |
+#define TASK_PT_GR13 716 /* offsetof(struct task_struct, thread.regs.gr[13]) */ |
287 |
+#define TASK_PT_GR14 720 /* offsetof(struct task_struct, thread.regs.gr[14]) */ |
288 |
+#define TASK_PT_GR15 724 /* offsetof(struct task_struct, thread.regs.gr[15]) */ |
289 |
+#define TASK_PT_GR16 728 /* offsetof(struct task_struct, thread.regs.gr[16]) */ |
290 |
+#define TASK_PT_GR17 732 /* offsetof(struct task_struct, thread.regs.gr[17]) */ |
291 |
+#define TASK_PT_GR18 736 /* offsetof(struct task_struct, thread.regs.gr[18]) */ |
292 |
+#define TASK_PT_GR19 740 /* offsetof(struct task_struct, thread.regs.gr[19]) */ |
293 |
+#define TASK_PT_GR20 744 /* offsetof(struct task_struct, thread.regs.gr[20]) */ |
294 |
+#define TASK_PT_GR21 748 /* offsetof(struct task_struct, thread.regs.gr[21]) */ |
295 |
+#define TASK_PT_GR22 752 /* offsetof(struct task_struct, thread.regs.gr[22]) */ |
296 |
+#define TASK_PT_GR23 756 /* offsetof(struct task_struct, thread.regs.gr[23]) */ |
297 |
+#define TASK_PT_GR24 760 /* offsetof(struct task_struct, thread.regs.gr[24]) */ |
298 |
+#define TASK_PT_GR25 764 /* offsetof(struct task_struct, thread.regs.gr[25]) */ |
299 |
+#define TASK_PT_GR26 768 /* offsetof(struct task_struct, thread.regs.gr[26]) */ |
300 |
+#define TASK_PT_GR27 772 /* offsetof(struct task_struct, thread.regs.gr[27]) */ |
301 |
+#define TASK_PT_GR28 776 /* offsetof(struct task_struct, thread.regs.gr[28]) */ |
302 |
+#define TASK_PT_GR29 780 /* offsetof(struct task_struct, thread.regs.gr[29]) */ |
303 |
+#define TASK_PT_GR30 784 /* offsetof(struct task_struct, thread.regs.gr[30]) */ |
304 |
+#define TASK_PT_GR31 788 /* offsetof(struct task_struct, thread.regs.gr[31]) */ |
305 |
+#define TASK_PT_FR0 792 /* offsetof(struct task_struct, thread.regs.fr[ 0]) */ |
306 |
+#define TASK_PT_FR1 800 /* offsetof(struct task_struct, thread.regs.fr[ 1]) */ |
307 |
+#define TASK_PT_FR2 808 /* offsetof(struct task_struct, thread.regs.fr[ 2]) */ |
308 |
+#define TASK_PT_FR3 816 /* offsetof(struct task_struct, thread.regs.fr[ 3]) */ |
309 |
+#define TASK_PT_FR4 824 /* offsetof(struct task_struct, thread.regs.fr[ 4]) */ |
310 |
+#define TASK_PT_FR5 832 /* offsetof(struct task_struct, thread.regs.fr[ 5]) */ |
311 |
+#define TASK_PT_FR6 840 /* offsetof(struct task_struct, thread.regs.fr[ 6]) */ |
312 |
+#define TASK_PT_FR7 848 /* offsetof(struct task_struct, thread.regs.fr[ 7]) */ |
313 |
+#define TASK_PT_FR8 856 /* offsetof(struct task_struct, thread.regs.fr[ 8]) */ |
314 |
+#define TASK_PT_FR9 864 /* offsetof(struct task_struct, thread.regs.fr[ 9]) */ |
315 |
+#define TASK_PT_FR10 872 /* offsetof(struct task_struct, thread.regs.fr[10]) */ |
316 |
+#define TASK_PT_FR11 880 /* offsetof(struct task_struct, thread.regs.fr[11]) */ |
317 |
+#define TASK_PT_FR12 888 /* offsetof(struct task_struct, thread.regs.fr[12]) */ |
318 |
+#define TASK_PT_FR13 896 /* offsetof(struct task_struct, thread.regs.fr[13]) */ |
319 |
+#define TASK_PT_FR14 904 /* offsetof(struct task_struct, thread.regs.fr[14]) */ |
320 |
+#define TASK_PT_FR15 912 /* offsetof(struct task_struct, thread.regs.fr[15]) */ |
321 |
+#define TASK_PT_FR16 920 /* offsetof(struct task_struct, thread.regs.fr[16]) */ |
322 |
+#define TASK_PT_FR17 928 /* offsetof(struct task_struct, thread.regs.fr[17]) */ |
323 |
+#define TASK_PT_FR18 936 /* offsetof(struct task_struct, thread.regs.fr[18]) */ |
324 |
+#define TASK_PT_FR19 944 /* offsetof(struct task_struct, thread.regs.fr[19]) */ |
325 |
+#define TASK_PT_FR20 952 /* offsetof(struct task_struct, thread.regs.fr[20]) */ |
326 |
+#define TASK_PT_FR21 960 /* offsetof(struct task_struct, thread.regs.fr[21]) */ |
327 |
+#define TASK_PT_FR22 968 /* offsetof(struct task_struct, thread.regs.fr[22]) */ |
328 |
+#define TASK_PT_FR23 976 /* offsetof(struct task_struct, thread.regs.fr[23]) */ |
329 |
+#define TASK_PT_FR24 984 /* offsetof(struct task_struct, thread.regs.fr[24]) */ |
330 |
+#define TASK_PT_FR25 992 /* offsetof(struct task_struct, thread.regs.fr[25]) */ |
331 |
+#define TASK_PT_FR26 1000 /* offsetof(struct task_struct, thread.regs.fr[26]) */ |
332 |
+#define TASK_PT_FR27 1008 /* offsetof(struct task_struct, thread.regs.fr[27]) */ |
333 |
+#define TASK_PT_FR28 1016 /* offsetof(struct task_struct, thread.regs.fr[28]) */ |
334 |
+#define TASK_PT_FR29 1024 /* offsetof(struct task_struct, thread.regs.fr[29]) */ |
335 |
+#define TASK_PT_FR30 1032 /* offsetof(struct task_struct, thread.regs.fr[30]) */ |
336 |
+#define TASK_PT_FR31 1040 /* offsetof(struct task_struct, thread.regs.fr[31]) */ |
337 |
+#define TASK_PT_SR0 1048 /* offsetof(struct task_struct, thread.regs.sr[ 0]) */ |
338 |
+#define TASK_PT_SR1 1052 /* offsetof(struct task_struct, thread.regs.sr[ 1]) */ |
339 |
+#define TASK_PT_SR2 1056 /* offsetof(struct task_struct, thread.regs.sr[ 2]) */ |
340 |
+#define TASK_PT_SR3 1060 /* offsetof(struct task_struct, thread.regs.sr[ 3]) */ |
341 |
+#define TASK_PT_SR4 1064 /* offsetof(struct task_struct, thread.regs.sr[ 4]) */ |
342 |
+#define TASK_PT_SR5 1068 /* offsetof(struct task_struct, thread.regs.sr[ 5]) */ |
343 |
+#define TASK_PT_SR6 1072 /* offsetof(struct task_struct, thread.regs.sr[ 6]) */ |
344 |
+#define TASK_PT_SR7 1076 /* offsetof(struct task_struct, thread.regs.sr[ 7]) */ |
345 |
+#define TASK_PT_IASQ0 1080 /* offsetof(struct task_struct, thread.regs.iasq[0]) */ |
346 |
+#define TASK_PT_IASQ1 1084 /* offsetof(struct task_struct, thread.regs.iasq[1]) */ |
347 |
+#define TASK_PT_IAOQ0 1088 /* offsetof(struct task_struct, thread.regs.iaoq[0]) */ |
348 |
+#define TASK_PT_IAOQ1 1092 /* offsetof(struct task_struct, thread.regs.iaoq[1]) */ |
349 |
+#define TASK_PT_CR27 1096 /* offsetof(struct task_struct, thread.regs.cr27) */ |
350 |
+#define TASK_PT_ORIG_R28 1104 /* offsetof(struct task_struct, thread.regs.orig_r28) */ |
351 |
+#define TASK_PT_KSP 1108 /* offsetof(struct task_struct, thread.regs.ksp) */ |
352 |
+#define TASK_PT_KPC 1112 /* offsetof(struct task_struct, thread.regs.kpc) */ |
353 |
+#define TASK_PT_SAR 1116 /* offsetof(struct task_struct, thread.regs.sar) */ |
354 |
+#define TASK_PT_IIR 1120 /* offsetof(struct task_struct, thread.regs.iir) */ |
355 |
+#define TASK_PT_ISR 1124 /* offsetof(struct task_struct, thread.regs.isr) */ |
356 |
+#define TASK_PT_IOR 1128 /* offsetof(struct task_struct, thread.regs.ior) */ |
357 |
+ |
358 |
+#define TASK_SZ 1272 /* sizeof(struct task_struct) */ |
359 |
+#define TASK_SZ_ALGN 1344 /* align(sizeof(struct task_struct), 64) */ |
360 |
+ |
361 |
+#define PT_PSW 0 /* offsetof(struct pt_regs, gr[ 0]) */ |
362 |
+#define PT_GR1 4 /* offsetof(struct pt_regs, gr[ 1]) */ |
363 |
+#define PT_GR2 8 /* offsetof(struct pt_regs, gr[ 2]) */ |
364 |
+#define PT_GR3 12 /* offsetof(struct pt_regs, gr[ 3]) */ |
365 |
+#define PT_GR4 16 /* offsetof(struct pt_regs, gr[ 4]) */ |
366 |
+#define PT_GR5 20 /* offsetof(struct pt_regs, gr[ 5]) */ |
367 |
+#define PT_GR6 24 /* offsetof(struct pt_regs, gr[ 6]) */ |
368 |
+#define PT_GR7 28 /* offsetof(struct pt_regs, gr[ 7]) */ |
369 |
+#define PT_GR8 32 /* offsetof(struct pt_regs, gr[ 8]) */ |
370 |
+#define PT_GR9 36 /* offsetof(struct pt_regs, gr[ 9]) */ |
371 |
+#define PT_GR10 40 /* offsetof(struct pt_regs, gr[10]) */ |
372 |
+#define PT_GR11 44 /* offsetof(struct pt_regs, gr[11]) */ |
373 |
+#define PT_GR12 48 /* offsetof(struct pt_regs, gr[12]) */ |
374 |
+#define PT_GR13 52 /* offsetof(struct pt_regs, gr[13]) */ |
375 |
+#define PT_GR14 56 /* offsetof(struct pt_regs, gr[14]) */ |
376 |
+#define PT_GR15 60 /* offsetof(struct pt_regs, gr[15]) */ |
377 |
+#define PT_GR16 64 /* offsetof(struct pt_regs, gr[16]) */ |
378 |
+#define PT_GR17 68 /* offsetof(struct pt_regs, gr[17]) */ |
379 |
+#define PT_GR18 72 /* offsetof(struct pt_regs, gr[18]) */ |
380 |
+#define PT_GR19 76 /* offsetof(struct pt_regs, gr[19]) */ |
381 |
+#define PT_GR20 80 /* offsetof(struct pt_regs, gr[20]) */ |
382 |
+#define PT_GR21 84 /* offsetof(struct pt_regs, gr[21]) */ |
383 |
+#define PT_GR22 88 /* offsetof(struct pt_regs, gr[22]) */ |
384 |
+#define PT_GR23 92 /* offsetof(struct pt_regs, gr[23]) */ |
385 |
+#define PT_GR24 96 /* offsetof(struct pt_regs, gr[24]) */ |
386 |
+#define PT_GR25 100 /* offsetof(struct pt_regs, gr[25]) */ |
387 |
+#define PT_GR26 104 /* offsetof(struct pt_regs, gr[26]) */ |
388 |
+#define PT_GR27 108 /* offsetof(struct pt_regs, gr[27]) */ |
389 |
+#define PT_GR28 112 /* offsetof(struct pt_regs, gr[28]) */ |
390 |
+#define PT_GR29 116 /* offsetof(struct pt_regs, gr[29]) */ |
391 |
+#define PT_GR30 120 /* offsetof(struct pt_regs, gr[30]) */ |
392 |
+#define PT_GR31 124 /* offsetof(struct pt_regs, gr[31]) */ |
393 |
+#define PT_FR0 128 /* offsetof(struct pt_regs, fr[ 0]) */ |
394 |
+#define PT_FR1 136 /* offsetof(struct pt_regs, fr[ 1]) */ |
395 |
+#define PT_FR2 144 /* offsetof(struct pt_regs, fr[ 2]) */ |
396 |
+#define PT_FR3 152 /* offsetof(struct pt_regs, fr[ 3]) */ |
397 |
+#define PT_FR4 160 /* offsetof(struct pt_regs, fr[ 4]) */ |
398 |
+#define PT_FR5 168 /* offsetof(struct pt_regs, fr[ 5]) */ |
399 |
+#define PT_FR6 176 /* offsetof(struct pt_regs, fr[ 6]) */ |
400 |
+#define PT_FR7 184 /* offsetof(struct pt_regs, fr[ 7]) */ |
401 |
+#define PT_FR8 192 /* offsetof(struct pt_regs, fr[ 8]) */ |
402 |
+#define PT_FR9 200 /* offsetof(struct pt_regs, fr[ 9]) */ |
403 |
+#define PT_FR10 208 /* offsetof(struct pt_regs, fr[10]) */ |
404 |
+#define PT_FR11 216 /* offsetof(struct pt_regs, fr[11]) */ |
405 |
+#define PT_FR12 224 /* offsetof(struct pt_regs, fr[12]) */ |
406 |
+#define PT_FR13 232 /* offsetof(struct pt_regs, fr[13]) */ |
407 |
+#define PT_FR14 240 /* offsetof(struct pt_regs, fr[14]) */ |
408 |
+#define PT_FR15 248 /* offsetof(struct pt_regs, fr[15]) */ |
409 |
+#define PT_FR16 256 /* offsetof(struct pt_regs, fr[16]) */ |
410 |
+#define PT_FR17 264 /* offsetof(struct pt_regs, fr[17]) */ |
411 |
+#define PT_FR18 272 /* offsetof(struct pt_regs, fr[18]) */ |
412 |
+#define PT_FR19 280 /* offsetof(struct pt_regs, fr[19]) */ |
413 |
+#define PT_FR20 288 /* offsetof(struct pt_regs, fr[20]) */ |
414 |
+#define PT_FR21 296 /* offsetof(struct pt_regs, fr[21]) */ |
415 |
+#define PT_FR22 304 /* offsetof(struct pt_regs, fr[22]) */ |
416 |
+#define PT_FR23 312 /* offsetof(struct pt_regs, fr[23]) */ |
417 |
+#define PT_FR24 320 /* offsetof(struct pt_regs, fr[24]) */ |
418 |
+#define PT_FR25 328 /* offsetof(struct pt_regs, fr[25]) */ |
419 |
+#define PT_FR26 336 /* offsetof(struct pt_regs, fr[26]) */ |
420 |
+#define PT_FR27 344 /* offsetof(struct pt_regs, fr[27]) */ |
421 |
+#define PT_FR28 352 /* offsetof(struct pt_regs, fr[28]) */ |
422 |
+#define PT_FR29 360 /* offsetof(struct pt_regs, fr[29]) */ |
423 |
+#define PT_FR30 368 /* offsetof(struct pt_regs, fr[30]) */ |
424 |
+#define PT_FR31 376 /* offsetof(struct pt_regs, fr[31]) */ |
425 |
+#define PT_SR0 384 /* offsetof(struct pt_regs, sr[ 0]) */ |
426 |
+#define PT_SR1 388 /* offsetof(struct pt_regs, sr[ 1]) */ |
427 |
+#define PT_SR2 392 /* offsetof(struct pt_regs, sr[ 2]) */ |
428 |
+#define PT_SR3 396 /* offsetof(struct pt_regs, sr[ 3]) */ |
429 |
+#define PT_SR4 400 /* offsetof(struct pt_regs, sr[ 4]) */ |
430 |
+#define PT_SR5 404 /* offsetof(struct pt_regs, sr[ 5]) */ |
431 |
+#define PT_SR6 408 /* offsetof(struct pt_regs, sr[ 6]) */ |
432 |
+#define PT_SR7 412 /* offsetof(struct pt_regs, sr[ 7]) */ |
433 |
+#define PT_IASQ0 416 /* offsetof(struct pt_regs, iasq[0]) */ |
434 |
+#define PT_IASQ1 420 /* offsetof(struct pt_regs, iasq[1]) */ |
435 |
+#define PT_IAOQ0 424 /* offsetof(struct pt_regs, iaoq[0]) */ |
436 |
+#define PT_IAOQ1 428 /* offsetof(struct pt_regs, iaoq[1]) */ |
437 |
+#define PT_CR27 432 /* offsetof(struct pt_regs, cr27) */ |
438 |
+#define PT_ORIG_R28 440 /* offsetof(struct pt_regs, orig_r28) */ |
439 |
+#define PT_KSP 444 /* offsetof(struct pt_regs, ksp) */ |
440 |
+#define PT_KPC 448 /* offsetof(struct pt_regs, kpc) */ |
441 |
+#define PT_SAR 452 /* offsetof(struct pt_regs, sar) */ |
442 |
+#define PT_IIR 456 /* offsetof(struct pt_regs, iir) */ |
443 |
+#define PT_ISR 460 /* offsetof(struct pt_regs, isr) */ |
444 |
+#define PT_IOR 464 /* offsetof(struct pt_regs, ior) */ |
445 |
+#define PT_SIZE 472 /* sizeof(struct pt_regs) */ |
446 |
+#define PT_SZ_ALGN 576 /* align(sizeof(struct pt_regs), 64) */ |
447 |
+ |
448 |
+#define TI_TASK 0 /* offsetof(struct thread_info, task) */ |
449 |
+#define TI_EXEC_DOMAIN 4 /* offsetof(struct thread_info, exec_domain) */ |
450 |
+#define TI_FLAGS 8 /* offsetof(struct thread_info, flags) */ |
451 |
+#define TI_CPU 16 /* offsetof(struct thread_info, cpu) */ |
452 |
+#define TI_SEGMENT 12 /* offsetof(struct thread_info, addr_limit) */ |
453 |
+#define TI_PRE_COUNT 20 /* offsetof(struct thread_info, preempt_count) */ |
454 |
+#define THREAD_SZ 44 /* sizeof(struct thread_info) */ |
455 |
+#define THREAD_SZ_ALGN 128 /* align(sizeof(struct thread_info), 64) */ |
456 |
+ |
457 |
+#define IRQSTAT_SIRQ_PEND 0 /* offsetof(irq_cpustat_t, __softirq_pending) */ |
458 |
+#define IRQSTAT_SZ 64 /* sizeof(irq_cpustat_t) */ |
459 |
+ |
460 |
+#define ICACHE_BASE 8 /* offsetof(struct pdc_cache_info, ic_base) */ |
461 |
+#define ICACHE_STRIDE 12 /* offsetof(struct pdc_cache_info, ic_stride) */ |
462 |
+#define ICACHE_COUNT 16 /* offsetof(struct pdc_cache_info, ic_count) */ |
463 |
+#define ICACHE_LOOP 20 /* offsetof(struct pdc_cache_info, ic_loop) */ |
464 |
+#define DCACHE_BASE 32 /* offsetof(struct pdc_cache_info, dc_base) */ |
465 |
+#define DCACHE_STRIDE 36 /* offsetof(struct pdc_cache_info, dc_stride) */ |
466 |
+#define DCACHE_COUNT 40 /* offsetof(struct pdc_cache_info, dc_count) */ |
467 |
+#define DCACHE_LOOP 44 /* offsetof(struct pdc_cache_info, dc_loop) */ |
468 |
+#define ITLB_SID_BASE 56 /* offsetof(struct pdc_cache_info, it_sp_base) */ |
469 |
+#define ITLB_SID_STRIDE 60 /* offsetof(struct pdc_cache_info, it_sp_stride) */ |
470 |
+#define ITLB_SID_COUNT 64 /* offsetof(struct pdc_cache_info, it_sp_count) */ |
471 |
+#define ITLB_OFF_BASE 68 /* offsetof(struct pdc_cache_info, it_off_base) */ |
472 |
+#define ITLB_OFF_STRIDE 72 /* offsetof(struct pdc_cache_info, it_off_stride) */ |
473 |
+#define ITLB_OFF_COUNT 76 /* offsetof(struct pdc_cache_info, it_off_count) */ |
474 |
+#define ITLB_LOOP 80 /* offsetof(struct pdc_cache_info, it_loop) */ |
475 |
+#define DTLB_SID_BASE 92 /* offsetof(struct pdc_cache_info, dt_sp_base) */ |
476 |
+#define DTLB_SID_STRIDE 96 /* offsetof(struct pdc_cache_info, dt_sp_stride) */ |
477 |
+#define DTLB_SID_COUNT 100 /* offsetof(struct pdc_cache_info, dt_sp_count) */ |
478 |
+#define DTLB_OFF_BASE 104 /* offsetof(struct pdc_cache_info, dt_off_base) */ |
479 |
+#define DTLB_OFF_STRIDE 108 /* offsetof(struct pdc_cache_info, dt_off_stride) */ |
480 |
+#define DTLB_OFF_COUNT 112 /* offsetof(struct pdc_cache_info, dt_off_count) */ |
481 |
+#define DTLB_LOOP 116 /* offsetof(struct pdc_cache_info, dt_loop) */ |
482 |
+ |
483 |
+#define PA_BLOCKSTEP_BIT 1 /* 31-PT_BLOCKSTEP_BIT */ |
484 |
+#define PA_SINGLESTEP_BIT 0 /* 31-PT_SINGLESTEP_BIT */ |
485 |
+ |
486 |
+#define ASM_PMD_SHIFT 21 /* PMD_SHIFT */ |
487 |
+#define ASM_PGDIR_SHIFT 21 /* PGDIR_SHIFT */ |
488 |
+#define ASM_BITS_PER_PGD 11 /* BITS_PER_PGD */ |
489 |
+#define ASM_BITS_PER_PMD 0 /* BITS_PER_PMD */ |
490 |
+#define ASM_BITS_PER_PTE 9 /* BITS_PER_PTE */ |
491 |
+#define ASM_PGD_PMD_OFFSET -8192 /* -(PAGE_SIZE << PGD_ORDER) */ |
492 |
+#define ASM_PMD_ENTRY 128 /* ((PAGE_OFFSET & PMD_MASK) >> PMD_SHIFT) */ |
493 |
+#define ASM_PGD_ENTRY 128 /* PAGE_OFFSET >> PGDIR_SHIFT */ |
494 |
+#define ASM_PGD_ENTRY_SIZE 4 /* PGD_ENTRY_SIZE */ |
495 |
+#define ASM_PMD_ENTRY_SIZE 4 /* PMD_ENTRY_SIZE */ |
496 |
+#define ASM_PTE_ENTRY_SIZE 8 /* PTE_ENTRY_SIZE */ |
497 |
+#define ASM_PT_INITIAL 4 /* PT_INITIAL */ |
498 |
+#define ASM_PAGE_SIZE 4096 /* PAGE_SIZE */ |
499 |
+ |
500 |
+ |
501 |
+#endif |
502 |
|
503 |
|
504 |
|
505 |
1.1 src/patchsets/gdb/6.7/80_all_gdb-6.5-dwarf-stack-overflow.patch |
506 |
|
507 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/80_all_gdb-6.5-dwarf-stack-overflow.patch?rev=1.1&view=markup |
508 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/80_all_gdb-6.5-dwarf-stack-overflow.patch?rev=1.1&content-type=text/plain |
509 |
|
510 |
Index: 80_all_gdb-6.5-dwarf-stack-overflow.patch |
511 |
=================================================================== |
512 |
http://bugs.gentoo.org/144833 |
513 |
|
514 |
for gdb/ChangeLog: |
515 |
2006-08-22 Will Drewry <wad@××××××.com> |
516 |
Tavis Ormandy <taviso@××××××.com> |
517 |
|
518 |
* dwarf2read.c (decode_locdesc): Enforce location description stack |
519 |
boundaries. |
520 |
* dwarfread.c (locval): Likewise. |
521 |
|
522 |
Index: gdb-6.5/gdb/dwarf2read.c |
523 |
=================================================================== |
524 |
--- gdb-6.5.orig/gdb/dwarf2read.c 2006-09-04 02:02:23.000000000 -0300 |
525 |
+++ gdb-6.5/gdb/dwarf2read.c 2006-09-04 02:02:23.000000000 -0300 |
526 |
@@ -8667,8 +8667,7 @@ dwarf2_fundamental_type (struct objfile |
527 |
callers will only want a very basic result and this can become a |
528 |
complaint. |
529 |
|
530 |
- Note that stack[0] is unused except as a default error return. |
531 |
- Note that stack overflow is not yet handled. */ |
532 |
+ Note that stack[0] is unused except as a default error return. */ |
533 |
|
534 |
static CORE_ADDR |
535 |
decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) |
536 |
@@ -8685,7 +8684,7 @@ decode_locdesc (struct dwarf_block *blk, |
537 |
|
538 |
i = 0; |
539 |
stacki = 0; |
540 |
- stack[stacki] = 0; |
541 |
+ stack[++stacki] = 0; |
542 |
|
543 |
while (i < size) |
544 |
{ |
545 |
@@ -8864,6 +8863,16 @@ decode_locdesc (struct dwarf_block *blk, |
546 |
dwarf_stack_op_name (op)); |
547 |
return (stack[stacki]); |
548 |
} |
549 |
+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing |
550 |
+ outside of the allocated space. Also enforce minimum > 0. |
551 |
+ -- wad@××××××.com 14 Aug 2006 */ |
552 |
+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) |
553 |
+ internal_error (__FILE__, __LINE__, |
554 |
+ _("location description stack too deep: %d"), |
555 |
+ stacki); |
556 |
+ if (stacki <= 0) |
557 |
+ internal_error (__FILE__, __LINE__, |
558 |
+ _("location description stack too shallow")); |
559 |
} |
560 |
return (stack[stacki]); |
561 |
} |
562 |
|
563 |
|
564 |
|
565 |
1.1 src/patchsets/gdb/6.7/README.history |
566 |
|
567 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/README.history?rev=1.1&view=markup |
568 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gdb/6.7/README.history?rev=1.1&content-type=text/plain |
569 |
|
570 |
Index: README.history |
571 |
=================================================================== |
572 |
1.0 [10.10.2007] |
573 |
+ 35_all_gdb-6.3-security-errata-20050610.patch |
574 |
+ 45_all_gdb-hppa-offsets.patch |
575 |
+ 80_all_gdb-6.5-dwarf-stack-overflow.patch |
576 |
|
577 |
|
578 |
|
579 |
-- |
580 |
gentoo-commits@g.o mailing list |