Re: ipsec 'replay' syslog error messages after reboot of one host

2000-05-11 Thread Ville-Pertti Keinonen


[EMAIL PROTECTED] (Matthew Dillon) writes:

> The question is:  What am I forgetting to do?  Or is this a bug in our
> IPSEC implementation?

AFAIK this is more or less how it's supposed to work.  IPsec is a
mess.  Security associations are not stateless, ESP provides replay
protection using a sequence number.  Replay-prevention is, however,
optional, and the setkey manual page claims it to be off by default,
so it could be a bug...you might want to try specifying -r 0
explicitly.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ipsec 'replay' syslog error messages after reboot of one host

2000-05-11 Thread Matthew Dillon


:
:
:[EMAIL PROTECTED] (Matthew Dillon) writes:
:
:> The question is:  What am I forgetting to do?  Or is this a bug in our
:> IPSEC implementation?
:
:AFAIK this is more or less how it's supposed to work.  IPsec is a
:mess.  Security associations are not stateless, ESP provides replay
:protection using a sequence number.  Replay-prevention is, however,
:optional, and the setkey manual page claims it to be off by default,
:so it could be a bug...you might want to try specifying -r 0
:explicitly.

IPSec isn't well documented, but once I figured out the config
file it didn't seem too bad.  I am guessing that replay prevention
is turned on by default, but specifying '-f cyclic-seq' in the
setkey config file at the appropriate place appears to solve the
problem.  I haven't tried testing with packet loss to see if it
can survive a noisy network.

I had to fix up /etc/rc.network a little to load the ipsec rules
at the appropriate point (just after the interface and ipfw setup,
but before any services (like NFS) are run).  I am going to put the
(relatively simple) patch for rc.network up for a quick review and
then commit it along with an example file and a reference to the
example file in the man page.

-Matt
Matthew Dillon 
<[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ipsec 'replay' syslog error messages after reboot of one host

2000-05-11 Thread Ville-Pertti Keinonen


> IPSec isn't well documented, but once I figured out the config
> file it didn't seem too bad.  I am guessing that replay prevention

Reading the RFCs might be more helpful than most of the KAME
documentation.  There's also a lot of undocumented stuff for which the
sources seem to be the only source of information (e.g. how PF_KEY v2
differs from the standard).

> I had to fix up /etc/rc.network a little to load the ipsec rules
> at the appropriate point (just after the interface and ipfw setup,
> but before any services (like NFS) are run).  I am going to put the
> (relatively simple) patch for rc.network up for a quick review and
> then commit it along with an example file and a reference to the
> example file in the man page.

Fixed security associations with an infinite lifetime are certainly
not the ideal way of using IPsec.  Examples of setups like this should
be provided with the appropriate warnings.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: icmp-response error

2000-05-11 Thread Joe Karthauser

On Thu, May 11, 2000 at 08:33:45AM +0200, [EMAIL PROTECTED] wrote:
> > A while back, I wrote a simplistic, but effect script to print out
> > information about who has a particular port open.
> 
> There is already a nice program to do this as part of the standard
> FreeBSD distribution: sockstat. It deserves wider use, IMHO.

You're right!  It does :)  [I didn't know about it until about 20 seconds
ago]

Joe


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ipsec 'replay' syslog error messages after reboot of one host

2000-05-11 Thread Kris Kennaway

On Thu, 11 May 2000, Matthew Dillon wrote:

> I had to fix up /etc/rc.network a little to load the ipsec rules
> at the appropriate point (just after the interface and ipfw setup,
> but before any services (like NFS) are run).  I am going to put the
> (relatively simple) patch for rc.network up for a quick review and
> then commit it along with an example file and a reference to the
> example file in the man page.

Please submit this to the KAME folks ([EMAIL PROTECTED]) as well so we
can keep in sync. I'm in the process of merging the latest KAME snapshot
into 5.0 with the aim of trying to update our IPv6/IPSec support
(Currently our IPSec code dates to November 1999), so keeping the two
codebases in sync as much as possible will help my job - I don't want the
FreeBSD IPv6/IPsec code to get ahead of the KAME code, or I'm likely to
miss the change locally and blow it away.

I'm not sure whether or not the problem you had was a bug - again, you'd
be best off speaking to the KAME guys directly (although given the age of
our ipsec code I don't know how much they'd be able to help)

Kris


In God we Trust -- all others must submit an X.509 certificate.
-- Charles Forsythe <[EMAIL PROTECTED]>



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



FreeBSD 4.0 and IBM PS/2 Model 65SX

2000-05-11 Thread Gheorghe Ardelean


Hi,

can I install FreeBSD 4.0R on a IBM PS/2 Model 65SX with 8MB Ram
and 2 SCSI HDD of 120MB each?

The netowrk card is an WD8003 and the SCSI Controller is Based on Adaptec
AIC-6250EL. 

regards,

Gheorghe ARDELEAN

West Univ. Of Timisoara
Dept. of Theoretical and Computational Physics
V. Parvan No.4, Ro-1900, Timisoara, ROMANIA
Tel: +40-(0)56-194068 Ext. 203, 201, 108 | Fax: +40-(0)56-190333
Email: [EMAIL PROTECTED]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



kernel SMP thread

2000-05-11 Thread FTG staff

Jordan said that the kernel SMP thread is ready in CURRENT FreeBSD,
but I could not find any document for the SMP kthread.

By looking at the kern/kern_kthread.c code, it does not look like a SMP
thread, and does not even have mutex functions in there.

Does any one happen to know where is the SMP kthread functions? specially
the mutex functions or thread locking mechanism for kernel thread?

TIA for any clue / helps,

-Jin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: icmp-response error

2000-05-11 Thread Ben Smithurst

Matthew Dillon wrote:

> If they are hidden (masquarading as some other typical process
> name), you can track them down with 'netstat -taA' to get the
> protocol address of the socket and then fstat to figure out which
> process owns the socket.

sockstat is your friend, if you're doing what I think you're doing.

-- 
Ben Smithurst / [EMAIL PROTECTED] / PGP: 0x99392F7D


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel SMP thread

2000-05-11 Thread Jordan K. Hubbard

> Jordan said that the kernel SMP thread is ready in CURRENT FreeBSD,
> but I could not find any document for the SMP kthread.

Huh?  I never said any such thing.  You must have misinterpreted
something else I said.

- Jordan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel SMP thread

2000-05-11 Thread FTG staff

> > Jordan said that the kernel SMP thread is ready in CURRENT FreeBSD,
> > but I could not find any document for the SMP kthread.
> 
> Huh?  I never said any such thing.  You must have misinterpreted
> something else I said.

I asked a question "Is FreeBSD working on SMP thread?" at both USENIX
and FreeBSDcon last year, you answered that it is already in the kernel,
but there is no API for userland. Maybe we misunderstund each other :-(

-Jin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



kernel panics at boot, how to specify dump device?

2000-05-11 Thread Marco Molteni

Hi all,

I have a 4-STABLE kernel that panics at boot. How do I force the kernel
to core dump?

I know that the handbook says to build a debug kernel and to set the
dump device via (dumpon + /etc/rc.conf) but in this case the kernel
panics during booting. The handbook says that, if the kernel panics at
boot, one can specify the dump device in the kernel configuration file,
with the "config kernel" line. I tried something like

config kernel dump on /dev/wd0s3b

(and variations thereof) but I get a syntax error from /usr/sbin/config.

I thought maybe it is possible to specify the dump device at the loader prompt?
Am I correct that once you specify the boot device the kernel will automatically
dump at panics?

Thanks for your help
Marco
-- 
Marco Molteni "rough consensus and running code"
SRI International, System Design Laboratory


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: CMSG_DATA and ALIGN macro

2000-05-11 Thread Bruce A. Mah

If memory serves me right, Marc van Kempen wrote:

> The problem is that the ALIGN macro is not being 
> picked up even though  and  are included.
> The problem arises from the use of the CMSG_DATA macro, which seems to
> be related to sendmsg(), and uses the ALIGN macro.
> 
> The manual page for sendmsg() or similar states that you only need
>  and , but this fails, it only works if 
> you also include  where the ALIGN macro is defined.
> 
> So the question is: is the manual page in error or are the 
> include files wrong? If it's the manual page, in which manual
> page are you supposed to find information about the use of the 
> CMSG_DATA macro? Otherwise I suppose the  include file
> should include ?

Hi Marc--

I ran into this a little while ago...you can look into the archives of 
the -current list for more details.

The upshot (as I understand it) is that CMSG_DATA shouldn't rely on the
programmer explicitly doing an #include of param.h.  No other OS seems
to require this (at least the ones to which pchar has been ported to,
which is my main area of concern).  I don't know if this has been
"fixed" or not because there were some rather complicated namespace
issues involved...you might check the CVSWeb repository.  Of the RELEASE
versions, only 4.0-RELEASE has this problem (so far).

That having been said, to bring in the definitions from param.h, what 
you're really supposed to do is to:

#include 

In other words, don't do .  This was told to me by 
Bruce Evans, who presumably knows what he's doing.  :-)

Bruce.






To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel SMP thread

2000-05-11 Thread Jordan K. Hubbard

> I asked a question "Is FreeBSD working on SMP thread?" at both USENIX
> and FreeBSDcon last year, you answered that it is already in the kernel,
> but there is no API for userland. Maybe we misunderstund each other :-(

I answered that we had *kernel* threads but that there was no native
API yet, just the "linuxthreads" kernel thread API.  Actual SMP-capable
kernel threads remain a pipe dream for us, however.  Want to work
on it? :-)

- Jordan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel panics at boot, how to specify dump device?

2000-05-11 Thread Brian O'Shea

On Thu, May 11, 2000 at 12:20:38PM -0700, Marco Molteni wrote:
> 
> I have a 4-STABLE kernel that panics at boot. How do I force the kernel
> to core dump?
> 
> I know that the handbook says to build a debug kernel and to set the
> dump device via (dumpon + /etc/rc.conf) but in this case the kernel
> panics during booting. The handbook says that, if the kernel panics at
> boot, one can specify the dump device in the kernel configuration file,
> with the "config kernel" line. I tried something like
> 
> config kernel dump on /dev/wd0s3b

>From the LINT kernel config file:

config  kernel  root on wd0 dumps on wd0

Maybe you forgot the 's' in "dumps"?  I have never tried this so I can't
say for sure.  Just noticed this in your post.

-brian

-- 
Brian O'Shea
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Looking for advice on lpr/lpd changes

2000-05-11 Thread Garance A Drosihn

At 1:02 PM -0400 5/10/00, Ted Buswell wrote:
>Right now, you could write a shell script to create all of
>the various permutations of printer shares, each one with
>an appropriate "print command" directive in your smb.conf.

We have >200 printers in printcap, and each of those printers
has at least two (and usually four or more) names.  To add two
options (-h and -m), would mean more than 4*5*200 names.  Ick...

>Or alternatively, hack the appropriate bits in Samba so that
>you can have your clients connect to \\s\p\options to get lpr
>printer 'p' off of server 'p', with given options.
>For example: \\server\printer\noheader,email
>would result in Samba invoking "lpr -Pprinter -h -m".

Initially this seemed like the wrong idea, but the more I think
about it the more I like it.  Certainly if I got that working,
it would avoid all possible conflicts with any setup anyone
currently has.  And it could be readily extended to a lot more
than just those two options.

>This isn't different from your proposed mod to lpr, it just
>shuffles where the work is done.

Well, it's different in one major way.  Here at RPI, I have
complete and utter control over lpr.  A different guy does
samba, and he's buried with other projects right now... :-)

Still, I'll have to think about this some more.  I think this
is probably the most promising strategy to consider.  Thanks!


---
Garance Alistair Drosehn   =   [EMAIL PROTECTED]
Senior Systems Programmer  or  [EMAIL PROTECTED]
Rensselaer Polytechnic Institute


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Looking for advice on lpr/lpd changes

2000-05-11 Thread Garance A Drosihn

At 12:14 PM -0400 5/10/00, Tim Vanderhoek wrote:
>On Wed, May 10, Garance A Drosihn wrote:
> >
> > 1990's) with the extra features we've added.  Once I have
> > things sorted out, I'll have a number of updates to offer.
>
>Cool!
>
> > [...]
>
>If you are hoping to have a serious discussion, a carefully
>written message to the -arch list may work.  The -arch list
>is meant to be a low(er)-volume, higher information-density
>list for discussing architectural changes.

Hmm.  I always assumed that was for "big freebsd architectural
changes", as opposed to changes to a "little program" like lpr.
I'll follow it for awhile and get a better feeling for it.  I
would like to find whichever people are particularly interested
in lpr/lpd changes, without distracting those people who really
don't care much about printing at all.

>Finished patches are best sent via send-pr(1) where they
>will eventually be addressed (although the response-time
>for send-pr(1) is regrettably long...)

I have already noticed that send-pr patches are sometimes
committed almost instantly, and other times it's like pulling
teeth to get some attention for them...


---
Garance Alistair Drosehn   =   [EMAIL PROTECTED]
Senior Systems Programmer  or  [EMAIL PROTECTED]
Rensselaer Polytechnic Institute


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Looking for advice on lpr/lpd changes

2000-05-11 Thread Ted Buswell


Garance A Drosihn writes:
 > At 1:02 PM -0400 5/10/00, Ted Buswell wrote:
 > >Right now, you could write a shell script to create all of
 > >the various permutations of printer shares, each one with
 > >an appropriate "print command" directive in your smb.conf.
 > 
 > We have >200 printers in printcap, and each of those printers
 > has at least two (and usually four or more) names.  To add two
 > options (-h and -m), would mean more than 4*5*200 names.  Ick...

I don't like the proposed idea (shell script mod of smb.conf) either,
however I was under the impression with your lpr mod you would also
bludgeon the user with 4*5*200 printer shares.

I had thought that with your lpr mod, you still need to somehow add
the "printer/hm" variations into the list of shares presented by samba.

Or am I missing a samba configuration option that permits the user to
specify the queue the job is sent to [instead of having them select
from a predefined list] ?

In any case, my choice would be for the samba hack ;)

-Ted


 > ---
 > Garance Alistair Drosehn   =   [EMAIL PROTECTED]
 > Senior Systems Programmer  or  [EMAIL PROTECTED]
 > Rensselaer Polytechnic Institute
 > 
 > 
 > To Unsubscribe: send mail to [EMAIL PROTECTED]
 > with "unsubscribe freebsd-hackers" in the body of the message


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Looking for advice on lpr/lpd changes

2000-05-11 Thread Bill Fumerola

On Wed, May 10, 2000 at 11:11:23PM -0600, Wes Peters wrote:

> > I've asked that people with pccard pr's also cc me or send me
> > numbers.  This has helped somewhat, but I'd like an easier to deal
> > with bug mechanism.
> 
> Have we given up on Keystone, or is it still under consideration?

I would keep under consideration, but the CLI isn't done/on the same level
as edit-pr..

-- 
Bill Fumerola - Network Architect / Computer Horizons Corp - CVM
e-mail: [EMAIL PROTECTED] / [EMAIL PROTECTED]





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: FreeBSD 4.0 and IBM PS/2 Model 65SX

2000-05-11 Thread Dutch Collins

Gheorghe Ardelean wrote:
> 
> Hi,
> 
> can I install FreeBSD 4.0R on a IBM PS/2 Model 65SX with 8MB Ram
> and 2 SCSI HDD of 120MB each?
> 
> The netowrk card is an WD8003 and the SCSI Controller is Based on Adaptec
> AIC-6250EL.
> 
> regards,
> 
> Gheorghe ARDELEAN
> 
> West Univ. Of Timisoara
> Dept. of Theoretical and Computational Physics
> V. Parvan No.4, Ro-1900, Timisoara, ROMANIA
> Tel: +40-(0)56-194068 Ext. 203, 201, 108 | Fax: +40-(0)56-190333
> Email: [EMAIL PROTECTED]
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message

NetBSD has a patch for their software that "should" work for MCA.

http://slashdot.org/article.pl?sid=00/05/06/1836253
http://mail-index.netbsd.org/current-users/2000/05/02/0021.html
http://www.ics.muni.cz/~dolecek/NetBSD/MCA/
-d
-- 
+---+
| Stuff n. -trappings, essence, junk, things, gear  |
+---+
| http://www.charm.net/~dutch   |


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel panics at boot, how to specify dump device?

2000-05-11 Thread Greg Lehey

On Thursday, 11 May 2000 at 13:03:59 -0700, Brian O'Shea wrote:
> On Thu, May 11, 2000 at 12:20:38PM -0700, Marco Molteni wrote:
>>
>> I have a 4-STABLE kernel that panics at boot. How do I force the kernel
>> to core dump?
>>
>> I know that the handbook says to build a debug kernel and to set the
>> dump device via (dumpon + /etc/rc.conf) but in this case the kernel
>> panics during booting. The handbook says that, if the kernel panics at
>> boot, one can specify the dump device in the kernel configuration file,
>> with the "config kernel" line. I tried something like
>>
>> config kernel dump on /dev/wd0s3b
>
>> From the LINT kernel config file:
>
> configkernel  root on wd0 dumps on wd0

That's not there in 4.0.  I believe most of this was vandalized some
time late last year.

I've been running in to this problem too.  I'm planning to add an
option to ddb where you can specify the dump device at the time where
you want to take the dump.

Marco, where exactly is it panicing?  Do you have ddb in the kernel?

Greg
--
Finger [EMAIL PROTECTED] for PGP public key
See complete headers for address and phone numbers


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-11 Thread Sergey Babkin

Warner Losh wrote:
> 
> In message <[EMAIL PROTECTED]> Sergey Babkin writes:
> : Seems like most of the modern machines just don't have that
> : pin on the PCI bus connected anywhere. But on most of them
> : (though not all) the pin on ISA works. Some high-end machines
> : like Unisys or Compaq have an NMI button on the box (sometimes
> : under the cover).
> 
> IOCHK* isn't on the PCI bus at all.  You have to do weird things for
> it to generate an NMI that I've never quite worked out.  I sure wish I

Probably SERR# is used instead. We have small cards
at work with a big button, ISA connector on one side and PCI
connector on the other one. I'm not sure exactly to which
signal on the bus is it connected. But the PCI side commonly
don't work for the modern machines.

> could get the pcccard bus (and/or cardbus) to genereate NMIs for
> laptop hacking at times.

If it's derived from PCI you can try to use SERR# or its analog.

-SB


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Looking for advice on lpr/lpd changes

2000-05-11 Thread Tim Vanderhoek

On Thu, May 11, 2000 at 04:43:25PM -0400, Garance A Drosihn wrote:
> 
> Hmm.  I always assumed that was for "big freebsd architectural
> changes", as opposed to changes to a "little program" like lpr.

I'd rather see a discussion about designing new features for lpr on
-arch than I would see a discussion on, say, I dunno, maybe renaming
all .s files to .S.


> I have already noticed that send-pr patches are sometimes
> committed almost instantly, and other times it's like pulling
> teeth to get some attention for them...

Don't feeling too guilty about politely knocking -committers over the head
once-in-a-while.  Just before weekends is probably a good time.  ;-)


-- 
Signature withheld by request of author.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Dual ethernet tl on Compaq Server

2000-05-11 Thread Christopher T. Griffiths

Hello, 

I am getting the following error after I upgraded from 3.4 to 4.0 on my
Firewall server:

tl0: got an invalid interrupt!
tl1: got an invalid interrupt!

Network services seem ok, but it is throwing this error constantly.

It is a cvsup of 4.0 -stable as of a few days ago.  

The hardware is a compaq 1850r server with the embedded tl nic and a tl
addon card.  

Any help would be appreciated.

Thanks

Chris

---
Christopher T. Griffiths
Quansoo Group Inc.
[EMAIL PROTECTED]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel SMP thread

2000-05-11 Thread Jake Burkholder

> Jordan said that the kernel SMP thread is ready in CURRENT FreeBSD,
> but I could not find any document for the SMP kthread.
> 
> By looking at the kern/kern_kthread.c code, it does not look like a SMP
> thread, and does not even have mutex functions in there.
> 
> Does any one happen to know where is the SMP kthread functions? specially
> the mutex functions or thread locking mechanism for kernel thread?

I have a simple implementation of mutexes and condition variables on my
web page, you are welcome to it.

http://io.yi.org

Jake



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Why this works?

2000-05-11 Thread FengYue


Hello,

I've 3 small programs.  First one writes 4K of data contains 'A's into a
file /tmp/pagetest and then lseek() to the begin of the file.
Second one writes 4K of 'Z' into the same file /tmp/pagetest and
then lseek() to the begin of the file.  They both do that in a tight
loop.  Now, the third program reads 4K of data from /tmp/pagetest
and exit if the 4K data does not contain all 'A's nor 'Z's.  3 programs
run concurrently on the same machine (3.4).  No lock in the code whatsoever,
and all 3 programs use pure write() and read().  I thought the third
program would exit pretty quickly since the data in the file may contain
mixed of 'A's and 'Z's, but it has been running for hours and nothing
happened.  Could someone kindly explain this?  I was told that this is
because the pagesize is 4096 in the kernel, so that read()/write() 4K of
data will not get context switched until the call is compeleted.  
Is that right?

I can attach the code if it's necessary.

Thanks

FengYue




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kernel SMP thread

2000-05-11 Thread FTG staff

> > I asked a question "Is FreeBSD working on SMP thread?" at both USENIX
> > and FreeBSDcon last year, you answered that it is already in the kernel,
> > but there is no API for userland. Maybe we misunderstund each other :-(
> 
> I answered that we had *kernel* threads but that there was no native
> API yet, just the "linuxthreads" kernel thread API.  Actual SMP-capable
> kernel threads remain a pipe dream for us, however.  Want to work
> on it? :-)

Ok, I probably missed the last sentence. Anyway, if I were knowledgeable
and good on SMP thread architecture, I would not ask the question :-)
But if people want a team, I can help in some part.

Once I can launch OC-12 driver for FreeBSD, and go for 3rd generation
network architecture, I will defininately need and work on SMP thread
more or less.

Thanks,

-Jin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Why this works?

2000-05-11 Thread Ville-Pertti Keinonen


[EMAIL PROTECTED] (FengYue) writes:

> I've 3 small programs.  First one writes 4K of data contains 'A's into a
> file /tmp/pagetest and then lseek() to the begin of the file.
> Second one writes 4K of 'Z' into the same file /tmp/pagetest and
> then lseek() to the begin of the file.  They both do that in a tight
> loop.  Now, the third program reads 4K of data from /tmp/pagetest
> and exit if the 4K data does not contain all 'A's nor 'Z's.  3 programs
> run concurrently on the same machine (3.4).  No lock in the code whatsoever,
> and all 3 programs use pure write() and read().  I thought the third
> program would exit pretty quickly since the data in the file may contain
> mixed of 'A's and 'Z's, but it has been running for hours and nothing
> happened.  Could someone kindly explain this?  I was told that this is
> because the pagesize is 4096 in the kernel, so that read()/write() 4K of
> data will not get context switched until the call is compeleted.  
> Is that right?

Not quite.  If FreeBSD didn't perform locking, operations affecting
single filesystem blocks would probably be atomic (as long as the
userland buffer is in memory).

However, FreeBSD does perform locking in read(2) and write(2) for
local files, so your third program should never fail and exit.

Note that the system call interface does not guarantee reads or writes
to be atomic, this just happens to be how it is implemented at the
moment.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Double buffered cp(1)

2000-05-11 Thread Kris Kennaway

On Mon, 24 Apr 2000, Kent Stewart wrote:

> This is what I see on a buildworld with 4.0-Stable
> 
> Modified /etc/make.conf and commented out CFLAGS= -Os -pipe
> 3707.4u 799.6s 1:35:52.46 78.3% 1374+1477k 56974+173232io 2337pf+0w
> 3693.9u 800.5s 1:29:45.73 83.4% 1375+1477k 55201+173224io 2160pf+0w
> Modified /etc/make.conf and added CFLAGS= -pipe
> 3559.2u 807.2s 1:28:00.05 82.6% 1608+1286k 56499+174033io 2516pf+0w

This is an old message, but what you're seeing here is that if CFLAGS is
not overridden, it is set by sys.mk to "-O -pipe"

Setting CFLAGS explicitly to "-pipe" is faster because it does no
optimization, "-Os -pipe" would be slower because it does more. Leaving
out -pipe would be slower still, because the compiler does data passing
using temporary files in /tmp instead of via a pipe.

Kris


In God we Trust -- all others must submit an X.509 certificate.
-- Charles Forsythe <[EMAIL PROTECTED]>



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: icmp-response error

2000-05-11 Thread void

On Thu, May 11, 2000 at 08:33:45AM +0200, [EMAIL PROTECTED] wrote:
> > A while back, I wrote a simplistic, but effect script to print out
> > information about who has a particular port open.
> 
> There is already a nice program to do this as part of the standard
> FreeBSD distribution: sockstat. It deserves wider use, IMHO.

lsof does the job nicely, too.

/usr/ports/sysutils/lsof

-- 
 Ben

220 go.ahead.make.my.day ESMTP Postfix


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: FreeBSD Port: xosview-1.7.3

2000-05-11 Thread Arun Sharma

In muc.lists.freebsd.ports, you wrote:
> 
>   Do you happen to know if Xosview can be made to show both CPU's in SMP 
> FreeBsd. I've just swapped from Linux to FreeBsd .

See the patches I mailed to freebsd-hackers late last year. You need to
patch both the kernel and the userland. I'm a little disappointed at
the lack of response. I just assumed that no one is interested - but
the question keeps coming up on the lists.

-Arun


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: FreeBSD 4.0 and IBM PS/2 Model 65SX

2000-05-11 Thread Matthew N. Dodd

On Thu, 11 May 2000, Dutch Collins wrote:
> Gheorghe Ardelean wrote:
> > can I install FreeBSD 4.0R on a IBM PS/2 Model 65SX with 8MB Ram
> > and 2 SCSI HDD of 120MB each?
> > 
> > The netowrk card is an WD8003 and the SCSI Controller is Based on Adaptec
> > AIC-6250EL.
> 
> NetBSD has a patch for their software that "should" work for MCA.
> 
> http://slashdot.org/article.pl?sid=00/05/06/1836253
> http://mail-index.netbsd.org/current-users/2000/05/02/0021.html
> http://www.ics.muni.cz/~dolecek/NetBSD/MCA/

FreeBSD has MCA support.  The 'ed' driver doesn't currently support the
WD8003/A but the AHA-1640 is supported.

GENERIC doesn't have MCA support built in so you'll need to build a custom
kernel and copy it to the boot floppy.

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |   2 x '84 Volvo 245DL| ix86,sparc,pmax |
| http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: FreeBSD Port: xosview-1.7.3

2000-05-11 Thread Doug Barton

Arun Sharma wrote:
> 
> In muc.lists.freebsd.ports, you wrote:
> >
> >   Do you happen to know if Xosview can be made to show both CPU's in SMP
> > FreeBsd. I've just swapped from Linux to FreeBsd .
> 
> See the patches I mailed to freebsd-hackers late last year. You need to
> patch both the kernel and the userland. I'm a little disappointed at
> the lack of response. I just assumed that no one is interested - but
> the question keeps coming up on the lists.

You'd get better results if you put it all together in a PR. 

Doug
-- 
"Live free or die"
- State motto of my ancestral homeland, New Hampshire

Do YOU Yahoo!?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message