[lkml]   [2008]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [regression] Re: brk randomization breaks columns
On Tue 2008-02-05 13:50:51, Jiri Kosina wrote:
> On Tue, 5 Feb 2008, Pavel Machek wrote:
> > > Actually, this clearly shows that either prehistoric or the
> > > program itself are broken.
> > I believe it shows clear regression in latest 2.6.25 kernel.
> I am still not completely sure. It might be a regression, but it also
> might just trigger the bug in ancient version in which might be
> fixed in some later version -- are you able to verify that?

I'm in same position as you here. I only have few old binaries :-(.

> > You say it is wrong. Manpages imply otherwise:
> >
> > int brk(void *end_data_segment);
> > ...
> > brk() sets the end of the data segment to the value specified by
> > end_data_segment, when that value is reasonable, the system does have enough
> > memory and the process does not exceed its max data size (see setrlimit(2)).
> > Note it talks about data segment, not about heap, and that seems to
> > imply that BSS and heap are actually one area. 2.6.25 broke that.
> Single Unix Specification talks only about manipulating the break section,
> see

# The brk() and sbrk() functions are used to change the amount of space
# allocated for the calling process.

It talks about "space for calling process". It does not talk about
heap, and I think it implicitely assumes "bss and heap" are

(It also says return 0 or success, and we return address).

> > > Still, it will probably not fix your particular program crashes, just
> > > because it will always assume that brk starts immediately after the end of
> > > the bss, which is plain wrong and has never been assured. Could you please
> > Can you quote docs that tells me it is plain wrong?
> See the Single Unix Specification. It doesn't seem to allow you to assume
> *anything* about start_brk location, seems to me.

I believe it implicitely assumes start_brk is well known,
actually. Otherwise it should have told us how to get start_brk.
(cesky, pictures)

 \ /
  Last update: 2008-02-05 17:15    [W:0.068 / U:7.548 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site