Re: Porting linux drivers to FreeBSD

2000-03-16 Thread Warner Losh

In message <[EMAIL PROTECTED]> Wes Peters writes:
: Patrick Seal wrote:
: > 
: > On Wed, Mar 15, 2000 at 01:35:11PM -0800i, Don Wallwork wrote:
: > > RealPort CardBus Ethernet 10/100 (RBE-100).
: > >
: > > I'll give the xe driver a try.
: > 
: > Dont even try, Cardbus (32-bit) isn't supported by FreeBSD yet.
: 
: You haven't been looking into 4.0, have you?

Hmmm.  Did someone commit cardbus while I wasn't looking?

Warner


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



Re: Big ATA problems

2000-03-16 Thread Alexander Langer

Thus spake Brian Fundakowski Feldman ([EMAIL PROTECTED]):

> You don't have any modules preloaded in /boot/loader.conf, do you?  That's

That's right.

Alex


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



Re: Big ATA problems

2000-03-16 Thread Soren Schmidt

It seems Alexander Langer wrote:
> Thus spake Brian Fundakowski Feldman ([EMAIL PROTECTED]):
> 
> > You don't have any modules preloaded in /boot/loader.conf, do you?  That's
> 
> That's right.

I think I lost track here, do you still have problems with the latest
ata in 4.0 or -current ???


-Søren


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



Re: Big ATA problems

2000-03-16 Thread Alexander Langer

Thus spake Soren Schmidt ([EMAIL PROTECTED]):

> > > You don't have any modules preloaded in /boot/loader.conf, do you?  That's
> > That's right.
> I think I lost track here, do you still have problems with the latest
> ata in 4.0 or -current ???

Not me, but I don't preload any modules in /boot/loader.conf

Alex


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



Re: Big ATA problems

2000-03-16 Thread Soren Schmidt

It seems Alexander Langer wrote:
> Thus spake Soren Schmidt ([EMAIL PROTECTED]):
> 
> > > > You don't have any modules preloaded in /boot/loader.conf, do you?  That's
> > > That's right.
> > I think I lost track here, do you still have problems with the latest
> > ata in 4.0 or -current ???
> 
> Not me, but I don't preload any modules in /boot/loader.conf

Ahh, but that problem has been solved long ago

-Søren


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



SSH Telnet

2000-03-16 Thread Kasper

Hello i wonder if it's possible to restrict users who log on whith SSH or
telnet to their own homedir only. Or how do i do so they cant read any other
files than their own. And the last question is how do i do so a user only
can do a ps a and not a ps ax ??


./Kasper Sweden



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



Re: Why not gzip iso images?

2000-03-16 Thread Paul Robinson

On Wed, 15 Mar 2000, Sheldon Hearn wrote:

> No, you're not reading the thread properly.  Someone else (who doesn't
> have the same bandwidth limitations that you and I do) said it doesn't
> compress well.

Ok, fair enough. My stance was that some compression was better than no
compression, but I'll bow out now... :)
 
> If you're just replying to be involved in an argument, I have a few
> newsgroups for you to try. :-)

I know, I've seen you on them. :)
 
> Otherwise, this is pretty much asked and answered.

Fair enough, like I said, I'll bow out.

Cheers,

-- 
Paul Robinson - Developer/Systems Administrator @ Akitanet Internet



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



T/TCP friendly inetd change?

2000-03-16 Thread David Malone

I was reading a little about T/TCP in Steven's book, and it occured
to me that some of inetd's small services would be ideal candidates
for T/TCP. (auth, time and daytime in particular).

According to Stevens, the main thing you need to do to make a server
T/TCP firendly is use the MSG_EOF flag when you send the last block
of data to that socket. For each of these services, which only
write a single block of data, this involves just changing:

write(s, buf, len);

to:

send(s, buf, len, MSG_EOF);

I've tried this over my slip link and it does seem to reduce the
number of packets sent by 2 for telnetting to the daytime port. I
also had a look at fetch (the only thing in the tree which uses
MSG_EOF at the moment), which has an option for turning off the
MSG_EOF stuff 'cos some buggy http servers don't like half closed
connections. I don't think this applies in this case 'cos we're
on the server side - not the client side, and the client expects
an EOF anyway.

Would this be an acceptable patch to inetd? It would be nice to
encourage the use of T/TCP within FreeBSD, as we seem to be the
only people who have it ;-)

David.

--- builtins.c  2000/03/11 11:28:07 1.19
+++ builtins.c  2000/03/16 21:20:02
@@ -219,7 +219,7 @@
clock = time((time_t *) 0);
 
(void) sprintf(buffer, "%.24s\r\n", ctime(&clock));
-   (void) write(s, buffer, strlen(buffer));
+   (void) send(s, buffer, strlen(buffer), MSG_EOF);
 }
 
 /*
@@ -320,7 +320,7 @@
syslog(LOG_ERR, "asprintf: %m");
exit(EX_OSERR);
}
-   write(s, p, strlen(p));
+   send(s, p, strlen(p), MSG_EOF);
free(p);
 
exit(0);
@@ -602,7 +602,7 @@
syslog(LOG_ERR, "asprintf: %m");
exit(EX_OSERR);
}
-   write(s, p, strlen(p));
+   send(s, p, strlen(p), MSG_EOF);
free(p);

exit(0);
@@ -664,7 +664,7 @@
unsigned long result;
 
result = machtime();
-   (void) write(s, (char *) &result, sizeof(result));
+   (void) send(s, (char *) &result, sizeof(result), MSG_EOF);
 }
 
 /*


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



RE: AMD Athlon and booting

2000-03-16 Thread Brian J. McGovern

Hey, guys. I went a slightly different route than playing with the numlock key
to get FreeBSD running. The problem seems to really be the -P (probe the 
keyboard) boot option, and it setting -D and -h when it doesn't find it. My
"workaround" was to make boot floppies, and edit boot.conf to remove the -P
(or delete the file if there are no other options). 

Once done, it just happily boots up and installs. Looks like keyboard probing
may need some work for Athlon processors, so i'm cc'ing this to the hackers
list, so hopefully, some console guru can take a look at it. 

Also, if no one has done it so far, let me know, and I'll submit a pr.

-Brian


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



Re: AMD Athlon and booting

2000-03-16 Thread Brian J. McGovern

Personally, I'm keen with the fact that the problem is known, its understood
there isn't an easy fix, and I have a work around.

-Brian
 > 
 > This has nothing to do with Athlon processors and everything to do with 
 > buggy BIOS code that doesn't set the "extended keyboard present" bit.  
 > Feel free to check the (very simple) code in boot2 that performs keyboard 
 > detection, and if you've got any better ideas on how to make this work 
 > properly, we're all ears. 8)
 > 
 > > Hey, guys. I went a slightly different route than playing with the numlock
 key
 > > to get FreeBSD running. The problem seems to really be the -P (probe the 
 > > keyboard) boot option, and it setting -D and -h when it doesn't find it. M
y
 > > "workaround" was to make boot floppies, and edit boot.conf to remove the -
P
 > > (or delete the file if there are no other options). 
 > > 
 > > Once done, it just happily boots up and installs. Looks like keyboard prob
ing
 > > may need some work for Athlon processors, so i'm cc'ing this to the hacker
s
 > > list, so hopefully, some console guru can take a look at it. 
 > > 
 > > Also, if no one has done it so far, let me know, and I'll submit a pr.
 > > 
 > >-Brian
 > > 
 > > 
 > > To Unsubscribe: send mail to [EMAIL PROTECTED]
 > > with "unsubscribe freebsd-hackers" in the body of the message
 > > 
 > 
 > -- 
 > \\ Give a man a fish, and you feed him for a day. \\  Mike Smith
 > \\ Tell him he should learn how to fish himself,  \\  [EMAIL PROTECTED]
 > \\ and he'll hate you for a lifetime. \\  [EMAIL PROTECTED]
 > 
 > 


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



Re: AMD Athlon and booting

2000-03-16 Thread Mike Smith


This has nothing to do with Athlon processors and everything to do with 
buggy BIOS code that doesn't set the "extended keyboard present" bit.  
Feel free to check the (very simple) code in boot2 that performs keyboard 
detection, and if you've got any better ideas on how to make this work 
properly, we're all ears. 8)

> Hey, guys. I went a slightly different route than playing with the numlock key
> to get FreeBSD running. The problem seems to really be the -P (probe the 
> keyboard) boot option, and it setting -D and -h when it doesn't find it. My
> "workaround" was to make boot floppies, and edit boot.conf to remove the -P
> (or delete the file if there are no other options). 
> 
> Once done, it just happily boots up and installs. Looks like keyboard probing
> may need some work for Athlon processors, so i'm cc'ing this to the hackers
> list, so hopefully, some console guru can take a look at it. 
> 
> Also, if no one has done it so far, let me know, and I'll submit a pr.
> 
>   -Brian
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  [EMAIL PROTECTED]
\\ and he'll hate you for a lifetime. \\  [EMAIL PROTECTED]




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



Why StarOffice continuously restarted setup - the answer

2000-03-16 Thread Sergey Babkin

Hi,

A while ago I tried to install StarOffice and had
a problem that every time I tried to start it it went
into setup again and again. I've asked about this
in -hackers and found that some people had the same
problem but nobody has a solution. Well, I've found that
solution today and in case anyone else hits that problem,
here it is: I'm using the July '99 4.0-SNAPSHOT and
in that snapshot reading /proc/NNN/cmdline returns
a line with '\n' on the end. StarOffice tried to open
a file with that name (its own code) and, of course, failed.
Removing that '\n' in procfs fixed the things. One
more catch is that the StarOffice bin directory must be in
the path, otherwise the same problem follows.

Both of these problems seem to be already fixed in -current.

-SB


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



RE: Odd crash

2000-03-16 Thread John Baldwin


On 15-Mar-00 Warner Losh wrote:
> 
> I just got an odd crash:
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x8
> fault code  = supervisor read, page not present
> instruction pointer = 0x8:0xc01d16ac
> stack pointer   = 0x10:0xc031e704
> frame pointer   = 0x10:0xc031e70c
> code segment= base 0x0, limit 0xf, type 0x1b
> = DPL 0, pres 1, def32 1, gran 1
> processor eflags= interrupt enabled, resume, IOPL = 0
> current process = Idle
> interrupt mask  = 
> kernel: type 12 trap, code=0
> Stopped at  arpintr+0x9c:   movl0x8(%ebx),%ecx
> db> trace
> arpintr(c02a997b,0,10,10,c5d20010) at arpintr+0x9c
> swi_net_next() at swi_net_next
> db>
> 
> I'm using the realtek driver with a RealTek 8139 built into the SBC
> that I have sitting on my desk.
> 
> rl0:  port 0x6000-0x60ff mem 0xf900-0xf9ff irq 11 
>at device 6.0 on
> pci0
> rl0: Ethernet address: 00:60:e0:00:7f:c8
> 
> Looking at the disassembled output of ddb, I think that I'm crashing
> at the following place.
> if (m->m_len < sizeof(struct arphdr) &&
> (m = m_pullup(m, sizeof(struct arphdr)) == NULL)) {
>   log(LOG_ERR, "arp: runt packet -- m_pullup failed.");
>   continue;
>   }
>   ar = mtod(m, struct arphdr *);
> 
> ==>   if (ntohs(ar->ar_hrd) != ARPHRD_ETHER
>   && ntohs(ar->ar_hrd) != ARPHRD_IEEE802) {
>   log(LOG_ERR,
>   "arp: unknown hardware address format (%2D)",
>   (unsigned char *)&ar->ar_hrd, "");
>   m_freem(m);
>   continue;
>   }
> 
> since ar is NULL for some reason.  I have no clue at all why this
> would happen.  This means that m->m_data has to be NULL.  But that
> doesn't make sense because of the m_pullup just before this.  If it
> doesn't return NULL, then I thought that m->m_data was guaranteed to
> be valid.
> 
> I think that there might be a bug in the code generation, but I don't
> know for sure.  If we look at the disassembled output:
> 
> arpintr+0x79:   testl   %eax,%eax
> arpintr+0x7b:   setz%al
> arpintr+0x7e:   movzbl  %al,%ebx
> arpintr+0x81:   testl   %ebx,%ebx
> arpintr+0x83:   jz  arpintr+0x9c

Functionally, apart from spamming %ebx, these 5 instructions
are equivalent to:

  testl %eax, %eax
  jnz   arpintr+0x9c

> arpintr+0x85:   pushl   $0xc02f5c60
> arpintr+0x8a:   pushl   $0x3
> arpintr+0x8c:   calllog
> arpintr+0x91:   addl$0x8,%esp
> arpintr+0x94:   jmp arpintr+0x5
> arpintr+0x99:   leal0(%esi),%esi

This instruction does nothing, so I assume this isn't
optimized code?

> arpintr+0x9c:   movl0x8(%ebx),%ecx
> arpintr+0x9f:   movzwl  0(%ecx),%eax
> arpintr+0xa2:   xchgb   %ah,%al
> arpintr+0xa4:   cmpw$0x1,%ax
> arpintr+0xa8:   jz  arpintr+0xd8
> arpintr+0xaa:   movzwl  0(%ecx),%eax
> arpintr+0xad:   xchgb   %ah,%al
> arpintr+0xaf:   cmpw$0x6,%ax
> arpintr+0xb3:   jz  arpintr+0xd8
> arpintr+0xb5:   pushl   $0xc02f5c0e
> arpintr+0xba:   pushl   %ecx
> arpintr+0xbb:   pushl   $0xc02f5ca0
> arpintr+0xc0:   pushl   $0x3
> arpintr+0xc2:   calllog
> 
> So we're between the two log calls, which is good.  Notice that we
> effectively zero %ebx at 7e.  We then jump to 9c if it isss zero, and
> then dereference 3bx.  Bang, we're dead.I think that the jz should
> be a jnz, no?

It looks like the compiler is making bad assumptions and/or trashing
%ebx.

 testl %eax,%eax   ; if %eax == 0, ZF = 1, else ZF = 0
 setz %al  ; if ZF, %al = 1, else %al = 0, so
   ; %al = !%eax
 movzbl %al, %ebx  ; %ebx = zero sign extend of %al
   ; so %ebx == 0 iff %eax != 0

So, %ebx is 0 (zero) if %eax != 0.  If %eax = m, then
%ebx is zero, and the jump is taken if %eax != NULL, i.e.
m != NULL, so that code generation is correct wrt to the if()
statement at least.  However, the stuff below that bothers me: 

  lea (%esi),%esi  ; basically does %esi = %esi

This probably is the

  'ar = mtod(m, struct arphdr *);'

In which case, if this is accurate, then %esi = ar,
and it should be:

  mov $8(%esi), %ecx  ; note %esi instead of %ebx

Also, if that is the case, then the jz in question
should jump to the lea instruction instead of the
mov instruction it faulted at.  It seems that the
compiler is assuming that %ebx = m, when in fact
%ebx != m, but is the boolean result of m != NULL.

I also don't like how it plays around with setz and
%ebx when it doesn't need to.  Also, it seems that
%eax == m, so perhaps if it were:

  mov $8(%eax),%ecx

it might work as well.  I'd have to see some of the
instructions beforehand to see what register m is in
to really know for sure, but %ebx is definitely not
valid when it is being looked at in that mov instruction.

> Warner

-- 

John Baldwin

Re: Why StarOffice continuously restarted setup - the answer

2000-03-16 Thread Brooks Davis

[This is -questions material, not -hackers, redirecting]

On Thu, Mar 16, 2000 at 08:24:51PM -0500, Sergey Babkin wrote:
> A while ago I tried to install StarOffice and had
> a problem that every time I tried to start it it went
> into setup again and again. I've asked about this
> in -hackers and found that some people had the same
> problem but nobody has a solution. Well, I've found that
> solution today and in case anyone else hits that problem,
> here it is: I'm using the July '99 4.0-SNAPSHOT and
> in that snapshot reading /proc/NNN/cmdline returns
> a line with '\n' on the end. StarOffice tried to open
> a file with that name (its own code) and, of course, failed.
> Removing that '\n' in procfs fixed the things. One
> more catch is that the StarOffice bin directory must be in
> the path, otherwise the same problem follows.
> 
> Both of these problems seem to be already fixed in -current.

See http://www.br.freebsd.org/staroffice.html

This page describes the problems causing setup to run again and again.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.


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



Re: Odd crash

2000-03-16 Thread Warner Losh

In message <[EMAIL PROTECTED]> John Baldwin writes:
: > arpintr+0x85:   pushl   $0xc02f5c60
: > arpintr+0x8a:   pushl   $0x3
: > arpintr+0x8c:   calllog
: > arpintr+0x91:   addl$0x8,%esp
: > arpintr+0x94:   jmp arpintr+0x5
: > arpintr+0x99:   leal0(%esi),%esi
: 
: This instruction does nothing, so I assume this isn't
: optimized code?

This is just padding to make the branch targets come out to a given
alignment.

I'm still at a loss for how it even works at all...

Warner


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



Re: SSH Telnet

2000-03-16 Thread Michael Lucas

Check out jail(8).

Takes more disk space, but well worth it.

==ml
>[Charset Windows-1252 unsupported, skipping...]



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



SendMail

2000-03-16 Thread Rafael Gomez

Everytime i try to send an email out of my server the answer is "Relaying
Denied".

Can any of yuo help me in order to fix this error or let me know where I can
find out the solution?

Thanks in advance

Rafael Gomez
[EMAIL PROTECTED]
Pager: [EMAIL PROTECTED]
Charter Communications International Venezuela

Tel: 58-2-576.60.80
Fax: 58-2-572.43.43



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



Re: SendMail

2000-03-16 Thread Kelly Yancey

On Thu, 16 Mar 2000, Rafael Gomez wrote:

> Everytime i try to send an email out of my server the answer is "Relaying
> Denied".
> 
> Can any of yuo help me in order to fix this error or let me know where I can
> find out the solution?
> 

  This is really more -questions material. Nonetheless, read
/etc/mail/README. Looks like your mail server is in a different domain
than your MUA. In which case you need to allow relaying for the domain in
/etc/mail/access and rebuild the access.db database. However, more
information would really be useful for a more accurate answer to your
specific problem.

  Kelly

--
Kelly Yancey  -  [EMAIL PROTECTED]  -  Richmond, VA
Analyst / E-business Development, Bell Industries  http://www.bellind.com/
Maintainer, BSD Driver Database   http://www.posi.net/freebsd/drivers/
Coordinator, Team FreeBSDhttp://www.posi.net/freebsd/Team-FreeBSD/




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



Re: Sysinstall 'A'uto partitioning

2000-03-16 Thread Greg Lehey

On Wednesday,  8 March 2000 at  8:15:26 -0700, Wes Peters wrote:
> "Koster, K.J." wrote:
>>
>> Also, I'd really love to be able to configure ccd stripe sets from
>> sysinstall, but I would not be surprised if that was too much to ask. :)
>
> Being able to configure vinum slices would be nice, too.  Especially
> once Greg commits support for booting from vinum volumes.  Think about
> booting from mirrored volumes for reliability.

The reliability issue is a different one.  But for now it's even
difficult to set up a vinum /usr.  That's definitely a place where
sysinstall could be improved.  It shouldn't be too difficult, either.

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



Vinum encapsulating existing partitions (was: Sysinstall 'A'uto partitioning)

2000-03-16 Thread Greg Lehey

On Thursday,  9 March 2000 at 11:12:21 +1030, Mark Newton wrote:
>
> Another thing which would be useful is the ability to "vinum-ize" an
> existing filesystem without destroying it first.  On Solaris and
> IRIX I can do that by creating a logical volume with a single plex
> which just happens to contain the same partition as the existing
> filesystem, thereby wrapping the filesystem in the logical volume.
> I can then mount that logical volume; the entire process takes about
> two minutes.  Adding additional plexes to it to grow it or add
> redundancy is then done in the same way that'd be done for any other
> logical volume.
>
> I'm not sure that you can do that with vinum, though.  Greg and I
> talked about it about six months ago as a nice thing to have, but
> there are, of course, other priorities...

It's still on my wishlist, though I don't know if I have it on the web
page (and since I'm on the road at the moment, I can't check).  My
main concern here is that I want to maintain the device name/drive ID
independence (for those who may not know, you can take the disks of a
Vinum array out, shuffle the device IDs and reboot, and it will still
put the components together in the correct way).  The obvious way to
do that is to say "there must be a Vinum partition on this physical
drive, but the subdisk doesn't have to be on it".  That could be a
problem for existing disks.  Thoughts?

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