1 |
On Wed, 02 Aug 2006 12:59:15 +0200 |
2 |
pageexec@××××××××.hu wrote: |
3 |
|
4 |
> On 2 Aug 2006 at 0:35, Kevin F. Quinn wrote: |
5 |
> > I think solar's referring to -fno-stack-protector-all. Not too |
6 |
> > worried about that myself, I think we can hide the change in |
7 |
> > semantics in flag-o-matic.eclass - actual ebuild use of |
8 |
> > -fno-stack-protector-all is rare. |
9 |
> |
10 |
> or we could patch that option in, i guess the 4.x version of ssp |
11 |
> can also be convinced to apply to all functions. |
12 |
|
13 |
I'd avoid doing that. In gcc-4.x the SSP support is a three-value |
14 |
setting; no-stack-protector, stack-protector and stack-protector-all |
15 |
with the semantics expected, where the last one specified wins. |
16 |
"-fno-stack-protector-all" doesn't fit intuitively with this |
17 |
approach. The old semantics of '-fno-stack-protector-all' was "if only |
18 |
ssp-all was specified, reduce to no-ssp; if ssp was specified as well |
19 |
as ssp-all reduce to ssp". |
20 |
|
21 |
The reason for suggesting we hide it in flag-o-matic, is that ebuilds |
22 |
generally do: |
23 |
|
24 |
filter-flags -fstack-protector |
25 |
|
26 |
or |
27 |
|
28 |
filter-flags -fstack-protector-all |
29 |
|
30 |
where the meaning is clear; it requires a bit of fiddling to get that |
31 |
right with gcc-4.1 but it's not difficult. |
32 |
|
33 |
In addition, Ebuilds generally don't use the '-fno-stack-*' options, so |
34 |
there's no real need to support -fno-stack-protector-all for ebuilds. |
35 |
The exceptions can be dealt with on a case-by-case basis. |
36 |
|
37 |
> > It's that gcc-4.x doesn't pass the caller information (function name |
38 |
> > and line number) to _stack_chk_fail. |
39 |
> |
40 |
> that too can be patched in, but even without this information it |
41 |
> is still better than nothing (i guess the assumption was that one |
42 |
> would get a coredump on abort() and could deduce all that and more |
43 |
> from there). |
44 |
> |
45 |
> > I've been thinking that a PaX-style register, stack and perhaps map |
46 |
> > dump might be a good idea for development environments at least. |
47 |
> |
48 |
> a coredump already has all that info, although it's not as easy to |
49 |
> make use of as dr watson on windows yet, but that'll change when |
50 |
> utrace (http://people.redhat.com/roland/utrace/) enters mainline. |
51 |
|
52 |
Leveraging core makes a lot of sense, and would solve any worries about |
53 |
information leaks since a "secure" system could be configured to never |
54 |
dump core. |
55 |
|
56 |
-- |
57 |
Kevin F. Quinn |