Re: fast/syscall-free gettimeofday ?

2011-06-15 Thread Scott Long
If this was to be extended with cached global syscall information like 
gettimeofday, would we want that to be in a separate page that is marked 
non-executable?  Is there any way to trick the kernel into leaking arbitrary 
(and thus executable) code?  Also, would it matter for jails?  Per-process info 
like getpid would obviously have to be a separate per-process page.

Scott

On Jun 14, 2011, at 10:08 AM, K. Macy wrote:

 http://svnweb.freebsd.org/base/head/sys/sys/imgact.h
 
 kib added rudimentary support for this in January
 
 On Tue, Jun 14, 2011 at 6:11 PM, Luigi Rizzo ri...@iet.unipi.it wrote:
 there were discussions at some point on an imprecise but
 fast implementations of gettimeofday() that would not require
 a system call (perhaps mmapping some memory region which
 is opportunistically updated).
 
 Does anyone remember what happened about that ?
 
 Otherwise, is there any place in the kernel where i can fetch
 a struct timeval which is not off by more than, say 1 tick ?
 
 cheers
 luigi
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
 
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: fast/syscall-free gettimeofday ?

2011-06-15 Thread Julian Elischer

If this was to be extended with cached global syscall information like 
gettimeofday, would we want that to be in a separate page that is marked 
non-executable?  Is there any way to trick the kernel into leaking arbitrary 
(and thus executable) code?  Also, would it matter for jails?  Per-process info 
like getpid would obviously have to be a separate per-process page.

Scott


In the talk about this sort of topic  I have seen mention at various times
of a page per system, a page per jail, a page per process and a page 
per thread.


I'm not saying we want this all just that I've seen it mentionned..

The per-thread one is the most intersting to do challenge wise.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: fast/syscall-free gettimeofday ?

2011-06-15 Thread Scott Long
On Jun 15, 2011, at 6:44 PM, Julian Elischer wrote:
 If this was to be extended with cached global syscall information like 
 gettimeofday, would we want that to be in a separate page that is marked 
 non-executable?  Is there any way to trick the kernel into leaking arbitrary 
 (and thus executable) code?  Also, would it matter for jails?  Per-process 
 info like getpid would obviously have to be a separate per-process page.
 
 Scott
 
 In the talk about this sort of topic  I have seen mention at various times
 of a page per system, a page per jail, a page per process and a page per 
 thread.
 
 I'm not saying we want this all just that I've seen it mentionned..
 
 The per-thread one is the most intersting to do challenge wise.

I guess that per-thread would be done via a pointer off of the TLS data, or 
would it be yet another bumping of the stack?  It would be interesting to see 
how expensive it is to go that direction.

Scott

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: fast/syscall-free gettimeofday ?

2011-06-15 Thread Julian Elischer

On Jun 15, 2011, at 6:44 PM, Julian Elischer wrote:

If this was to be extended with cached global syscall information like 
gettimeofday, would we want that to be in a separate page that is marked 
non-executable?  Is there any way to trick the kernel into leaking arbitrary 
(and thus executable) code?  Also, would it matter for jails?  Per-process info 
like getpid would obviously have to be a separate per-process page.

Scott


In the talk about this sort of topic  I have seen mention at various times
of a page per system, a page per jail, a page per process and a page per thread.

I'm not saying we want this all just that I've seen it mentionned..

The per-thread one is the most intersting to do challenge wise.

I guess that per-thread would be done via a pointer off of the TLS data, or 
would it be yet another bumping of the stack?  It would be interesting to see 
how expensive it is to go that direction.

note that I wasn't volunteering ;-)

Scott

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org




___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: fast/syscall-free gettimeofday ?

2011-06-14 Thread K. Macy
On Tue, Jun 14, 2011 at 6:08 PM, K. Macy km...@freebsd.org wrote:
 http://svnweb.freebsd.org/base/head/sys/sys/imgact.h

 kib added rudimentary support for this in January

To clarify, this is just the kernel side of the shared page
infrastructure, and is currently only hosting the the signal handling
code. The user library side is non-existent and no data sharing
currently happens.
-Kip

 On Tue, Jun 14, 2011 at 6:11 PM, Luigi Rizzo ri...@iet.unipi.it wrote:
 there were discussions at some point on an imprecise but
 fast implementations of gettimeofday() that would not require
 a system call (perhaps mmapping some memory region which
 is opportunistically updated).

 Does anyone remember what happened about that ?

 Otherwise, is there any place in the kernel where i can fetch
 a struct timeval which is not off by more than, say 1 tick ?

 cheers
 luigi
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: fast/syscall-free gettimeofday ?

2011-06-14 Thread K. Macy
http://svnweb.freebsd.org/base/head/sys/sys/imgact.h

kib added rudimentary support for this in January

On Tue, Jun 14, 2011 at 6:11 PM, Luigi Rizzo ri...@iet.unipi.it wrote:
 there were discussions at some point on an imprecise but
 fast implementations of gettimeofday() that would not require
 a system call (perhaps mmapping some memory region which
 is opportunistically updated).

 Does anyone remember what happened about that ?

 Otherwise, is there any place in the kernel where i can fetch
 a struct timeval which is not off by more than, say 1 tick ?

 cheers
 luigi
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org