Virus intercepted

2004-12-05 Thread hackers
A message you sent to
<[EMAIL PROTECTED]>
contained Worm.SomeFool.X and has not been delivered.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mmap()

2004-12-05 Thread John-Mark Gurney
Kamal R. Prasad wrote this message on Mon, Dec 06, 2004 at 11:16 +0530:
> John-Mark Gurney wrote:
> 
> >Kamal R. Prasad wrote this message on Sun, Dec 05, 2004 at 00:38 +0530:
> > 
> >
> >>I wrote an mmap() interface for a USB device. But when I made a call to 
> >>it using mmap(), I saw that mmap interface is called 3-4 times. The 
> >>calls are being made from within mmap() i.e. sys/vm/vm_mmap.c. Can 
> >>someone tell me if there is something like a re-try going on for some 
> >>reason?
> >>From userspace, I called it as 
> >>addr = mmap(NULL, 1024, PROT_READ, MAP_SHARED, fd, 0);
> >>The version of OS is Freebsd 5.3(stable).
> >>   
> >>
> >
> >each mmap call will be called whenever the kernel needs to map that
> >specific page..  say you map 16k of your device...  it won't map any
> >of the 16k until the first time it is accessed, then it will call the
> >mmap routine for each page as it is accessed...  it is also possible that
> >memory for the mappings needs to be reclaimed, at which point those page
> >mappings will be reaped, and your mmap function will be called again when
> >they need to be accessed again..
> >
> > 
> >
> Thanks. But then, the mmap'ed() address was yet to be used by the user 
> space and I don't see the need for multiple calls to my interface almost 
> as if in a while loop.  Is there any return value from the mmap() 
> interface that could trigger another call? I am returning 0 after 
> setting the param to vtophys(kernel virtual address).

You are suppose to return 0 on success (that the permission are correct
and doable i.e. that you can write when the write bit is set) and put
the phys adder in paddr...

If you look at sys/vm/device_pager.c, you'll see that on line 139, it
makes sure that the permissions are correct for the entire mapping
(that the user doesn't try to map for writing a read-only mapping)...

Then later at line 222, is when the actual mapping gets done..

-- 
  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: mmap()

2004-12-05 Thread Kamal R. Prasad
John-Mark Gurney wrote:
Kamal R. Prasad wrote this message on Sun, Dec 05, 2004 at 00:38 +0530:
 

I wrote an mmap() interface for a USB device. But when I made a call to 
it using mmap(), I saw that mmap interface is called 3-4 times. The 
calls are being made from within mmap() i.e. sys/vm/vm_mmap.c. Can 
someone tell me if there is something like a re-try going on for some 
reason?
From userspace, I called it as 
addr = mmap(NULL, 1024, PROT_READ, MAP_SHARED, fd, 0);
The version of OS is Freebsd 5.3(stable).
   

each mmap call will be called whenever the kernel needs to map that
specific page..  say you map 16k of your device...  it won't map any
of the 16k until the first time it is accessed, then it will call the
mmap routine for each page as it is accessed...  it is also possible that
memory for the mappings needs to be reclaimed, at which point those page
mappings will be reaped, and your mmap function will be called again when
they need to be accessed again..
 

Thanks. But then, the mmap'ed() address was yet to be used by the user 
space and I don't see the need for multiple calls to my interface almost 
as if in a while loop.  Is there any return value from the mmap() 
interface that could trigger another call? I am returning 0 after 
setting the param to vtophys(kernel virtual address).

regards
-kamal
___
[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 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: mmap()

2004-12-05 Thread John-Mark Gurney
Kamal R. Prasad wrote this message on Sun, Dec 05, 2004 at 00:38 +0530:
> I wrote an mmap() interface for a USB device. But when I made a call to 
> it using mmap(), I saw that mmap interface is called 3-4 times. The 
> calls are being made from within mmap() i.e. sys/vm/vm_mmap.c. Can 
> someone tell me if there is something like a re-try going on for some 
> reason?
> From userspace, I called it as 
> addr = mmap(NULL, 1024, PROT_READ, MAP_SHARED, fd, 0);
> The version of OS is Freebsd 5.3(stable).

each mmap call will be called whenever the kernel needs to map that
specific page..  say you map 16k of your device...  it won't map any
of the 16k until the first time it is accessed, then it will call the
mmap routine for each page as it is accessed...  it is also possible that
memory for the mappings needs to be reclaimed, at which point those page
mappings will be reaped, and your mmap function will be called again when
they need to be accessed again..

-- 
  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 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: 5.3-R PXE installation

2004-12-05 Thread Dmitry Morozovsky
On Sun, 5 Dec 2004, Dmitry Morozovsky wrote:

DM> I'm trying to setup PXE istallation for new server. Up to pxeboot everything
DM> goes smoothly. pxeboot mounting NFS root successively; however, it
DM> immediately whines with
DM> 
DM> Loader version 1.1+ required
DM> Aborted!
DM> start not found
DM> 
DM> then it loads kernel (which I gunzipped from kern.gz from floppies)
DM> successfully, draws '|', reinitializes keyboard, hangs for about 10-20 secs
DM> and silently reboots. The same effect if using kernel from miniinst/fixit
DM> CD.
DM> 
DM> Any clues?

For archives/searches:

Answer is simple than anyone can think: pxeboot was from RELENG_4. Replacing it 
with RELENG_5 version fixes booting.

Sorry for the noise.

Sincerely,
D.Marck[DM5020, MCK-RIPE, DM3-RIPN]
---
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
---
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


5.3-R PXE installation

2004-12-05 Thread Dmitry Morozovsky
Dear colleagues,
I'm trying to setup PXE istallation for new server. Up to pxeboot everything 
goes smoothly. pxeboot mounting NFS root successively; however, it immediately 
whines with

Loader version 1.1+ required
Aborted!
start not found
then it loads kernel (which I gunzipped from kern.gz from floppies) 
successfully, draws '|', reinitializes keyboard, hangs for about 10-20 secs and 
silently reboots. The same effect if using kernel from miniinst/fixit CD.

Any clues?
Sincerely,
D.Marck[DM5020, MCK-RIPE, DM3-RIPN]
---
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
---
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: My project wish-list for the next 12 months

2004-12-05 Thread Chris Pressey
On Wed, 01 Dec 2004 15:02:40 -0700
Scott Long <[EMAIL PROTECTED]> wrote:

> All,
> 
> I know that I said last month that we were going to stop promising
> specific features for the next major release.  However, I'd like to
> throw out a list of things that would be really nice to have in the
> future, whether its 6.0 or 7.0 or whatever.  Most of these tasks are
> not trivial, but I hope that talking about them will encourage some
> interest.  These are in no particular priority order.  I'd also be
> thrilled if someone wanted to dress this list up in docbook and add
> it to the webpage.  While this is just my personal list, I'd welcome
> other additions to it (in the sense of significant projects, not just
> individual PRs or bug fixes that one might be interested in).
> 
> [...]
> 
> 2.  New installer.  I know some people still consider this a joke, but
> the reality is that sysinstall is no longer state of the art.  It's
> fairly good at the simple task that it does, but it's becoming harder
> and harder to fix bugs and extend functionality in it.  It's also
> fairly unfriendly to those of us who haven't been using it since 1995.
> The DFly folks have some very interesting work in this area
> (www.bsdinstaller.com) and it would be very good to see if we can
> collaborate with them on it.

I'm glad you find it interesting.  If you have any questions, feel free
to ask.  There are definately two factors to consider in any attempt to
integrate this installer with the FreeBSD release process.  One is that
it is designed to be run from a fairly full-featured environment (i.e. a
LiveCD.)  It has been successfully integrated with the latest FreeSBIE
though, so beyond that I wouldn't expect many technical difficulties. 
The other factor is that the BSD installer project is (not unlike
DragonFly itself) quite experimental, and we don't hesitate to rewrite
entire subsystems (and break the interfaces between them) when a better
idea and/or more tractable code comes along.

Anyway, since you asked, if I were to write a wish-list for FreeBSD, I
guess it would look something like:

1.  Flesh out the mission statement, such as it is (FAQ #1.2.)  "We
provide no-strings-attached software" is an excellent start, but by
itself, it's awkwardly nonspecific.  Extend it by specifying that the
provided software does come, in fact, in the form of an operating
system, and describe the intended properties of such (performant/
stable/featureful/easy-to-use/whatever/etc/etc.)

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