Re: MALLOC_STATS and pledge

2015-11-14 Thread David CARLIER
Might be indeed, there are other use cases with valgrind and protexec and so on ..., utrace might be a good suggestion too except maybe a need for an exception in pledge's side then. On 13 November 2015 at 18:34, Ted Unangst wrote: > David CARLIER wrote: >> Hi all, >> >> I

Re: MALLOC_STATS and pledge

2015-11-14 Thread Stuart Henderson
On 2015/11/14 14:01, David CARLIER wrote: > Might be indeed, there are other use cases with valgrind and protexec > and so on ..., utrace might be a good suggestion too except maybe a > need for an exception in pledge's side then. btw, valgrind currently ssems to be quite broken with pledge.

Re: MALLOC_STATS and pledge

2015-11-14 Thread Theo de Raadt
> On 2015/11/14 14:01, David CARLIER wrote: > > Might be indeed, there are other use cases with valgrind and protexec > > and so on ..., utrace might be a good suggestion too except maybe a > > need for an exception in pledge's side then. > > btw, valgrind currently ssems to be quite broken with

MALLOC_STATS and pledge

2015-11-13 Thread David CARLIER
Hi all, I ve tried to discuss this point with Otto Moerbeek but he might be very busy so I throw the topic here if you do not mind ... I have the habit to enable MALLOC_STATS but with the recent pledge feature, it s now difficult to debug some pledged applications with MALLOC_OPTIONS=D as, for

Re: MALLOC_STATS and pledge

2015-11-13 Thread Ted Unangst
David CARLIER wrote: > Hi all, > > I ve tried to discuss this point with Otto Moerbeek but he might be > very busy so I throw the topic here if you do not mind ... > > I have the habit to enable MALLOC_STATS but with the recent pledge > feature, it s now difficult to debug some pledged

Re: MALLOC_STATS and pledge

2015-11-13 Thread Otto Moerbeek
On Fri, Nov 13, 2015 at 09:11:46AM +, David CARLIER wrote: > Hi all, > > I ve tried to discuss this point with Otto Moerbeek but he might be > very busy so I throw the topic here if you do not mind ... > > I have the habit to enable MALLOC_STATS but with the recent pledge > feature, it s

Re: MALLOC_STATS and pledge

2015-11-13 Thread Theo de Raadt
> I ve tried to discuss this point with Otto Moerbeek but he might be > very busy so I throw the topic here if you do not mind ... > > I have the habit to enable MALLOC_STATS but with the recent pledge > feature, it s now difficult to debug some pledged applications with > MALLOC_OPTIONS=D as,

Re: MALLOC_STATS and pledge

2015-11-13 Thread Theo de Raadt
> An idea would be to open the fd at init time, which should be early > enough for most cases (i.e. before the first pledge(2) call). Big > drawback is the open fd all the time until program exits. Keeping a fd open through libc runtime is not going to fly. It isn't just the fragility of it.