Re: Rebooting the kernel without resetting uptime?

2004-12-05 Thread Craig Boston
On Friday 03 December 2004 8:20 am, Stefan Midjich wrote:
> I know a guy i respect on IRC told me this is not possible but since
> this is the hackers list i thought the topic at least deserves a
> discussion. I guess i wont be able to sit still until someone either
> does it or shows me why it can't be done.

Of course you can.  Just attach gdb to your running kernel and muck with the 
global boottime structure.  That's considered cheating, though, so don't do 
it!

( a few minutes later )

Hmm, apparently either something has changed in kgdb in 5.3 or I just forgot 
the magic incantation, because it doesn't seem to allow modification of 
memory -- just "Bad file descriptor".  Getting the address from there and 
writing to /dev/kmem directly still works though.

the-cheat# uname -r
5.3-STABLE
the-cheat# uptime
 9:03PM  up 3485 days, 21:44, 1 user, load averages: 0.24, 0.12, 0.12
the-cheat# sysctl kern.boottime
kern.boottime: { sec = 80112, usec = 345099 } Mon May 22 00:20:00 1995
the-cheat#

:-P

Craig
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Rebooting the kernel without resetting uptime?

2004-12-05 Thread John-Mark Gurney
Mike Silbersack wrote this message on Sun, Dec 05, 2004 at 20:24 -0600:
> On Fri, 3 Dec 2004, Stefan Midjich wrote:
> 
> >I know a guy i respect on IRC told me this is not possible but since this 
> >is the hackers list i thought the topic at least deserves a discussion. I 
> >guess i wont be able to sit still until someone either does it or shows me 
> >why it can't be done.
> 
> Faking the uptime which is retrieved by netcraft and other services which 
> check TCP timestamps would be easy.
> 
> Faking your local uptime might be a bit more work, there could be 
> sideeffects of accelerating the timecounters.

Bah, it's not that hard, just write out the current uptime on shutdown,
then update the boottime and uptime on bootup...  make their sysctl's
writable, it shouldn't be a problem..  though what's just a number, might
as well make your uptime 500 years.. :)  that'd really throw everyone..

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Rebooting the kernel without resetting uptime?

2004-12-05 Thread Mike Silbersack
On Fri, 3 Dec 2004, Stefan Midjich wrote:
Hi
I know a guy i respect on IRC told me this is not possible but since this is 
the hackers list i thought the topic at least deserves a discussion. I guess 
i wont be able to sit still until someone either does it or shows me why it 
can't be done.
Faking the uptime which is retrieved by netcraft and other services which 
check TCP timestamps would be easy.

Faking your local uptime might be a bit more work, there could be 
sideeffects of accelerating the timecounters.

Mike "Silby" Silbersack
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Rebooting the kernel without resetting uptime?

2004-12-04 Thread Julio Capote
Erik Udo wrote:
Stefan Midjich wrote:
Hi
I know a guy i respect on IRC told me this is not possible but since 
this is the hackers list i thought the topic at least deserves a 
discussion. I guess i wont be able to sit still until someone either 
does it or shows me why it can't be done.

Everthing is possible! Even more possible if the source is open!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"

Im pretty interested in this aswellI'd have INFINITE uptime! =)
- Julio
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Rebooting the kernel without resetting uptime?

2004-12-04 Thread Erik Udo
Stefan Midjich wrote:
Hi
I know a guy i respect on IRC told me this is not possible but since 
this is the hackers list i thought the topic at least deserves a 
discussion. I guess i wont be able to sit still until someone either 
does it or shows me why it can't be done.
Everthing is possible! Even more possible if the source is open!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Rebooting the kernel without resetting uptime?

2004-12-04 Thread Stefan Midjich
Hi
I know a guy i respect on IRC told me this is not possible but since 
this is the hackers list i thought the topic at least deserves a 
discussion. I guess i wont be able to sit still until someone either 
does it or shows me why it can't be done.
--


Med vänliga hälsningar
Stefan Midjich, Swebase AB
Tel: 042-20 15 00
Fax: 042-20 15 03
E-post: [EMAIL PROTECTED]
Webb: http://swebase.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"