Re: CVS commit: src/lib/librumphijack

2011-01-27 Thread Antti Kantee
On Wed Jan 26 2011 at 13:48:32 -0500, Christos Zoulas wrote: > Module Name: src > Committed By: christos > Date: Wed Jan 26 18:48:32 UTC 2011 > > Modified Files: > src/lib/librumphijack: hijack.c > > Log Message: > make SSP friendly Can you add a comment stating why readlink and g

Re: CVS commit: src/lib/librumphijack

2011-01-27 Thread Christos Zoulas
In article <20110127140249.gd23...@cs.hut.fi>, Antti Kantee wrote: >On Wed Jan 26 2011 at 13:48:32 -0500, Christos Zoulas wrote: >> Module Name: src >> Committed By:christos >> Date:Wed Jan 26 18:48:32 UTC 2011 >> >> Modified Files: >> src/lib/librumphijack: hijack.c

Re: CVS commit: src/lib/librumphijack

2011-02-07 Thread Antti Kantee
On Mon Feb 07 2011 at 11:51:02 +, Antti Kantee wrote: > Module Name: src > Committed By: pooka > Date: Mon Feb 7 11:51:02 UTC 2011 > > Modified Files: > src/lib/librumphijack: hijack.c > > Log Message: > Unbreak the ssp lossage from the default -current build by removing > it.

Re: CVS commit: src/lib/librumphijack

2011-02-07 Thread Christos Zoulas
In article <20110207124333.gg15...@cs.hut.fi>, Antti Kantee wrote: >On Mon Feb 07 2011 at 11:51:02 +, Antti Kantee wrote: >> Module Name: src >> Committed By:pooka >> Date:Mon Feb 7 11:51:02 UTC 2011 >> >> Modified Files: >> src/lib/librumphijack: hijack.c >> >

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
On Tue Feb 08 2011 at 05:15:39 +, Christos Zoulas wrote: > In article <20110207124333.gg15...@cs.hut.fi>, > Antti Kantee wrote: > >On Mon Feb 07 2011 at 11:51:02 +, Antti Kantee wrote: > >> Module Name: src > >> Committed By: pooka > >> Date: Mon Feb 7 11:51:02 UT

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Christos Zoulas
On Feb 8, 5:01pm, po...@cs.hut.fi (Antti Kantee) wrote: -- Subject: Re: CVS commit: src/lib/librumphijack | On Tue Feb 08 2011 at 05:15:39 +, Christos Zoulas wrote: | > In article <20110207124333.gg15...@cs.hut.fi>, | > Antti Kantee wrote: | > >On Mon Feb 07 2011 at 11:

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
On Tue Feb 08 2011 at 15:03:11 -0500, Christos Zoulas wrote: > [explanation] > > In your c code then in hijack.c you need to define the body of _hijack_read. > You also end up needing to define the bodies of readlink and getcwd, but > that is easily done... > > I hope that helps. The trick to und

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Christos Zoulas
On Feb 8, 10:30pm, po...@cs.hut.fi (Antti Kantee) wrote: -- Subject: Re: CVS commit: src/lib/librumphijack | On Tue Feb 08 2011 at 15:03:11 -0500, Christos Zoulas wrote: | > [explanation] | > | > In your c code then in hijack.c you need to define the body of _hijack_read. | > You

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Joerg Sonnenberger
On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: > Still the problem remains, how do we stack the calls to insert the ssp > check at the top level, without resorting to rtld tricks? Let me try to summarize the situation to make sure I get it right: The fortification code wants to

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
On Tue Feb 08 2011 at 22:00:49 +0100, Joerg Sonnenberger wrote: > On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: > > Still the problem remains, how do we stack the calls to insert the ssp > > check at the top level, without resorting to rtld tricks? > > Let me try to summarize th

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
On Tue Feb 08 2011 at 23:22:44 +0200, Antti Kantee wrote: > On Tue Feb 08 2011 at 22:00:49 +0100, Joerg Sonnenberger wrote: > > On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: > > > Still the problem remains, how do we stack the calls to insert the ssp > > > check at the top level,

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Joerg Sonnenberger
On Tue, Feb 08, 2011 at 11:22:44PM +0200, Antti Kantee wrote: > On Tue Feb 08 2011 at 22:00:49 +0100, Joerg Sonnenberger wrote: > > On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: > > > Still the problem remains, how do we stack the calls to insert the ssp > > > check at the top le

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
On Tue Feb 08 2011 at 22:41:57 +0100, Joerg Sonnenberger wrote: > On Tue, Feb 08, 2011 at 11:22:44PM +0200, Antti Kantee wrote: > > On Tue Feb 08 2011 at 22:00:49 +0100, Joerg Sonnenberger wrote: > > > On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: > > > > Still the problem remain

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Antti Kantee
On Tue Feb 08 2011 at 23:04:35 +0100, Joerg Sonnenberger wrote: > > > > No, it wants to override "whatever is the symbol applications are > > > > resolved to". For -current this is "_sys_read" (on nb5 it's "read"). > > > > > > That's not what the library is doing according to nm. It defines "read

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Joerg Sonnenberger
On Tue, Feb 08, 2011 at 11:43:40PM +0200, Antti Kantee wrote: > On Tue Feb 08 2011 at 22:41:57 +0100, Joerg Sonnenberger wrote: > > On Tue, Feb 08, 2011 at 11:22:44PM +0200, Antti Kantee wrote: > > > On Tue Feb 08 2011 at 22:00:49 +0100, Joerg Sonnenberger wrote: > > > > On Tue, Feb 08, 2011 at 03:

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Christos Zoulas
In article <20110208210049.ga8...@britannica.bec.de>, Joerg Sonnenberger wrote: >On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: >> Still the problem remains, how do we stack the calls to insert the ssp >> check at the top level, without resorting to rtld tricks? > >Let me try to

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Christos Zoulas
In article <20110208220435.ga10...@britannica.bec.de>, Joerg Sonnenberger wrote: >On Tue, Feb 08, 2011 at 11:43:40PM +0200, Antti Kantee wrote: >> On Tue Feb 08 2011 at 22:41:57 +0100, Joerg Sonnenberger wrote: >> > On Tue, Feb 08, 2011 at 11:22:44PM +0200, Antti Kantee wrote: >> > > On Tue Feb 0

Re: CVS commit: src/lib/librumphijack

2011-02-08 Thread Christos Zoulas
In article <20110208212244.gk22...@cs.hut.fi>, Antti Kantee wrote: >On Tue Feb 08 2011 at 22:00:49 +0100, Joerg Sonnenberger wrote: >> On Tue, Feb 08, 2011 at 03:34:54PM -0500, Christos Zoulas wrote: >> > Still the problem remains, how do we stack the calls to insert the ssp >> > check at the top

Re: CVS commit: src/lib/librumphijack

2011-02-09 Thread Joerg Sonnenberger
On Wed, Feb 09, 2011 at 02:30:38AM +, Christos Zoulas wrote: > >To get the layering correct, we could make the fortification code define > >another prototype and use double rename, e.g. > > > >ssize_t __real_read(int __fd, ...) __RENAME(read); > > > >__ssp_inline ssize_t read(int __fd, ...) __R

Re: CVS commit: src/lib/librumphijack

2011-02-09 Thread Antti Kantee
On Wed Feb 09 2011 at 02:32:17 +, Christos Zoulas wrote: > >And, on a tangent, it would really help if we had some mechanism for > >"latest version of symbol exported by libc" (cf. mess with select, > >pollts, kevent and socket). For working compat, I guess we'd need to > >bump rumphijack majo

Re: CVS commit: src/lib/librumphijack

2011-02-09 Thread Valeriy E. Ushakov
On Wed, Feb 09, 2011 at 14:06:08 +0200, Antti Kantee wrote: > On Wed Feb 09 2011 at 02:32:17 +, Christos Zoulas wrote: > > >And, on a tangent, it would really help if we had some mechanism for > > >"latest version of symbol exported by libc" (cf. mess with select, > > >pollts, kevent and socke

Re: CVS commit: src/lib/librumphijack

2011-02-19 Thread Antti Kantee
On Sat Feb 19 2011 at 14:58:45 +0100, Joerg Sonnenberger wrote: > On Sat, Feb 19, 2011 at 01:10:36PM +, Antti Kantee wrote: > > Module Name:src > > Committed By: pooka > > Date: Sat Feb 19 13:10:35 UTC 2011 > > > > Modified Files: > > src/lib/librumphijack: hija

Re: CVS commit: src/lib/librumphijack

2011-02-19 Thread Joerg Sonnenberger
On Sat, Feb 19, 2011 at 01:10:36PM +, Antti Kantee wrote: > Module Name: src > Committed By: pooka > Date: Sat Feb 19 13:10:35 UTC 2011 > > Modified Files: > src/lib/librumphijack: hijack.c > > Log Message: > hijack __getcwd() Why? Joerg

Re: CVS commit: src/lib/librumphijack

2011-02-19 Thread Joerg Sonnenberger
On Sat, Feb 19, 2011 at 07:54:25PM +0200, Antti Kantee wrote: > On Sat Feb 19 2011 at 14:58:45 +0100, Joerg Sonnenberger wrote: > > On Sat, Feb 19, 2011 at 01:10:36PM +, Antti Kantee wrote: > > > Module Name: src > > > Committed By: pooka > > > Date: Sat Feb 19 13:10:35 UTC

Re: CVS commit: src/lib/librumphijack

2011-02-20 Thread Antti Kantee
On Sun Feb 20 2011 at 04:34:02 +0100, Joerg Sonnenberger wrote: > On Sat, Feb 19, 2011 at 07:54:25PM +0200, Antti Kantee wrote: > > On Sat Feb 19 2011 at 14:58:45 +0100, Joerg Sonnenberger wrote: > > > On Sat, Feb 19, 2011 at 01:10:36PM +, Antti Kantee wrote: > > > > Module Name:src > > > >

Re: CVS commit: src/lib/librumphijack

2011-02-21 Thread YAMAMOTO Takashi
> Module Name: src > Committed By: pooka > Date: Mon Feb 7 19:34:39 UTC 2011 > > Modified Files: > src/lib/librumphijack: hijack.c > > Log Message: > Force gcc to generate a stack frame for the call to dlsym(RTLD_NEXT). > Without this hack at least amd64 -O2 just used jmp and The

Re: CVS commit: src/lib/librumphijack

2011-02-22 Thread Antti Kantee
On Mon Feb 21 2011 at 23:19:47 +, YAMAMOTO Takashi wrote: > > Module Name:src > > Committed By: pooka > > Date: Mon Feb 7 19:34:39 UTC 2011 > > > > Modified Files: > > src/lib/librumphijack: hijack.c > > > > Log Message: > > Force gcc to generate a stack frame

Re: CVS commit: src/lib/librumphijack

2011-02-22 Thread YAMAMOTO Takashi
> On Mon Feb 21 2011 at 23:19:47 +, YAMAMOTO Takashi wrote: >> > Module Name: src >> > Committed By: pooka >> > Date: Mon Feb 7 19:34:39 UTC 2011 >> > >> > Modified Files: >> >src/lib/librumphijack: hijack.c >> > >> > Log Message: >> > Force gcc to generate a stac

Re: CVS commit: src/lib/librumphijack

2011-02-23 Thread Antti Kantee
On Wed Feb 23 2011 at 01:31:51 +, YAMAMOTO Takashi wrote: > > On Mon Feb 21 2011 at 23:19:47 +, YAMAMOTO Takashi wrote: > >> > Module Name: src > >> > Committed By:pooka > >> > Date:Mon Feb 7 19:34:39 UTC 2011 > >> > > >> > Modified Files: > >> > src/lib/librumphijack

Re: CVS commit: src/lib/librumphijack

2011-02-26 Thread Valeriy E. Ushakov
On Fri, Feb 25, 2011 at 16:01:42 +, Antti Kantee wrote: > Module Name: src > Committed By: pooka > Date: Fri Feb 25 16:01:42 UTC 2011 > > Modified Files: > src/lib/librumphijack: Makefile hijackdlsym.c > > Log Message: > Ok, for reasons I can't begin to understand, the binarie

Re: CVS commit: src/lib/librumphijack

2011-02-26 Thread Valeriy E. Ushakov
On Sun, Feb 27, 2011 at 08:12:37 +0300, Valeriy E. Ushakov wrote: > On Fri, Feb 25, 2011 at 16:01:42 +, Antti Kantee wrote: > > > Module Name:src > > Committed By: pooka > > Date: Fri Feb 25 16:01:42 UTC 2011 > > > > Modified Files: > > src/lib/librumphijack:

re: CVS commit: src/lib/librumphijack

2011-02-26 Thread matthew green
> > cvs rdiff -u -r1.7 -r1.8 src/lib/librumphijack/Makefile > > cvs rdiff -u -r1.1 -r1.2 src/lib/librumphijack/hijackdlsym.c > > I think this is caused by revision 1.121 of rtld.c (hi, mac!) that > added "hackish_return_address" for ppc. > > #ifdef __powerpc__ > static void * > hackish_return_ad

Re: CVS commit: src/lib/librumphijack

2011-02-27 Thread Antti Kantee
On Sun Feb 27 2011 at 08:12:37 +0300, Valeriy E. Ushakov wrote: > On Fri, Feb 25, 2011 at 16:01:42 +, Antti Kantee wrote: > > > Module Name:src > > Committed By: pooka > > Date: Fri Feb 25 16:01:42 UTC 2011 > > > > Modified Files: > > src/lib/librumphijack: Mak

Re: CVS commit: src/lib/librumphijack

2011-03-09 Thread Christoph Egger
On 03/09/11 16:03, Antti Kantee wrote: Module Name:src Committed By: pooka Date: Wed Mar 9 15:03:18 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: Add a bunch of process-wide hijack calls. Among other things, it's now possible to use unmodified u

Re: CVS commit: src/lib/librumphijack

2011-03-10 Thread Valeriy E. Ushakov
On Thu, Mar 10, 2011 at 23:02:56 +, Antti Kantee wrote: > Use rumphijack_dlsym() to figure out where __sysctl() is during > init. Otherwise powerpc dlsym() DTWT and returns NULL. > (now i have no idea why dlsym() it works from rcinit(), but i'll > opt to not care) I don't remember if I broug

Re: CVS commit: src/lib/librumphijack

2011-03-11 Thread Antti Kantee
On Fri Mar 11 2011 at 03:34:47 +0300, Valeriy E. Ushakov wrote: > On Thu, Mar 10, 2011 at 23:02:56 +, Antti Kantee wrote: > > > Use rumphijack_dlsym() to figure out where __sysctl() is during > > init. Otherwise powerpc dlsym() DTWT and returns NULL. > > (now i have no idea why dlsym() it wor