Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Warner Losh

In message <[EMAIL PROTECTED]> Dima Dorfman writes:
: Right now, if you try to detach an md device that's currently mounted,
: you will get a panic (maybe not immedietely, but it will come, esp. if
: you ever try to use that mountpoint again).  I'm pretty sure this is a
: known problem, with the solution--or workaround--being, "then don't do
: that."  The problem is, someone will invariably do it.  The fix is to
: make md complain if you try to detach a device that's currently
: opened.  Below is a patch that implements this by keeping track of the
: number of times a device has been opened.

I'd like to see the kernel deal with this in a more graceful way.
The kernel will crash if you have a ata flash mounted and you eject
the card...

Warner

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



Re: Kernel compile problems

2001-03-13 Thread Peter Pentchev

On Mon, Mar 12, 2001 at 05:24:14PM -0500, Elliott Perrin wrote:
> I just did a cvs of  src-all this morning, remade the world and am trying to compile 
>a new
> kernel. I am able to make depend, but I just tried to do the make and got the 
>following
> errors
[TCPDEBUG compile error log snipped]

There's an open PR on this: kern/25651 (actually, I've had to close two
more PR's in the last two days, since people post PR's without checking -
or maybe they do check, and for some reason miss kern/25651).

Anyway, could somebody knowledgeable look into kern/25651?  It seems to
contain a fix, too..

G'luck,
Peter

-- 
The rest of this sentence is written in Thailand, on

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



mail.local

2001-03-13 Thread Zaitsev Serg



I have upgrade on FreeBSD 3.5 and FreeBSD 4.2 the 
Sendmail 8.11.3.On FreeBSD 3.5 all is OK.But on FreeBSD 4.2 I got 
trouble. With /usr/local/bin/mail.local or /usr/libexec/mail.local .cat 
/var/log/maillogMar 13 11:59:24 gate sendmail[82883]: starting daemon 
(8.11.3): SMTP+queueing@00:30:00Mar 13 11:59:24 gate mail.local: setreuid(0, 
1000): Operation not permitted (r=1, e=1)Mar 13 11:59:24 gate 
sendmail[82884]: f2CDpNU76288: to=zaitsev, ctladdr=<[EMAIL PROTECTED]> (0/0), delay=19:08:01, 
xdelay=00:00:00, mailer=local, pri=120665, dsn=5.0.0, stat=Service 
unavailableMar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: forward 
<[EMAIL PROTECTED]> => zaitsevMar 13 
11:59:24 gate sendmail[82884]: f2CDpNU76288: f2D8xOl82884: DSN: Service 
unavailableMar 13 11:59:24 gate mail.local: setreuid(0, 1000): Operation not 
permitted (r=1, e=1)Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: 
to=zaitsev, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30765, dsn=5.0.0, 
stat=Service unavailableMar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: 
alias MAILER-DAEMON =>postmasterMar 13 11:59:24 gate sendmail[82884]: 
f2D8xOl82884: alias postmaster => rootMar 13 11:59:24 gate 
sendmail[82884]: f2D8xOl82884: forward root => zaitsevMar 13 11:59:24 
gate sendmail[82884]: f2D8xOl82884: alias postmaster => rootMar 13 
11:59:24 gate sendmail[82884]: f2D8xOl82884: forward root => zaitsevMar 
13 11:59:24 gate sendmail[82884]: f2D8xOl82884: f2D8xOm82884: return to sender: 
Service unavailableMar 13 11:59:24 gate mail.local: setreuid(0, 1000): 
Operation not permitted (r=1, e=1)Mar 13 11:59:24 gate sendmail[82884]: 
f2D8xOm82884: to=zaitsev, delay=00:00:00, xdelay=00:00:00, mailer=local, 
pri=30865, dsn=5.0.0, stat=Service unavailableMar 13 11:59:24 gate 
sendmail[82884]: f2D8xOm82884: alias MAILER-DAEMON => postmasterMar 13 
11:59:24 gate sendmail[82884]: f2D8xOm82884: alias postmaster => rootMar 
13 11:59:24 gate sendmail[82884]: f2D8xOm82884: forward root => 
zaitsevMar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: done; 
delay=00:00:00, ntries=1Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: 
Losing ./qff2D8xOl82884: savemail panicMar 13 11:59:24 gate sendmail[82884]: 
f2D8xOl82884: SYSERR(root): savemail: cannot save rejected email 
anywhereHelp me how to power it returns to normal operations?Any 
conclusions is very appreciated.Zaitsev Serg, [EMAIL PROTECTED]


Re: mail.local

2001-03-13 Thread Peter Wemm

First, stop sending html mail..

Second, rebuild /etc/mail/sendmail.cf.  Mergemaster is your friend.  The
newer sendmail configuration passes on root privs to mail.local, which is
no longer setuid itself.

"Zaitsev Serg" wrote:
> This is a multi-part message in MIME format.
> 
> --=_NextPart_000_0171_01C0ABB9.410D6430
> Content-Type: text/plain;
>   charset="koi8-r"
> Content-Transfer-Encoding: quoted-printable
> 
> I have upgrade on FreeBSD 3.5 and FreeBSD 4.2 the Sendmail 8.11.3.
> On FreeBSD 3.5 all is OK.
> But on FreeBSD 4.2 I got trouble. With /usr/local/bin/mail.local or =
> /usr/libexec/mail.local .
> 
> cat /var/log/maillog
> Mar 13 11:59:24 gate sendmail[82883]: starting daemon (8.11.3): =
> SMTP+queueing@00:30:00
> Mar 13 11:59:24 gate mail.local: setreuid(0, 1000): Operation not =
> permitted (r=3D1, e=3D1)
> Mar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: to=3Dzaitsev, =
> ctladdr=3D<[EMAIL PROTECTED]> (0/0), delay=3D19:08:01, xdelay=3D00:00:00, =
> mailer=3Dlocal, pri=3D120665, dsn=3D5.0.0, stat=3DService unavailable
> Mar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: forward =
> <[EMAIL PROTECTED]> =3D> zaitsev
> Mar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: f2D8xOl82884: DSN: =
> Service unavailable
> Mar 13 11:59:24 gate mail.local: setreuid(0, 1000): Operation not =
> permitted (r=3D1, e=3D1)
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: to=3Dzaitsev, =
> delay=3D00:00:00, xdelay=3D00:00:00, mailer=3Dlocal, pri=3D30765, =
> dsn=3D5.0.0, stat=3DService unavailable
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: alias MAILER-DAEMON =
> =3D>postmaster
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: alias postmaster =
> =3D> root
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: forward root =3D> =
> zaitsev
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: alias postmaster =
> =3D> root
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: forward root =3D> =
> zaitsev
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: f2D8xOm82884: return =
> to sender: Service unavailable
> Mar 13 11:59:24 gate mail.local: setreuid(0, 1000): Operation not =
> permitted (r=3D1, e=3D1)
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: to=3Dzaitsev, =
> delay=3D00:00:00, xdelay=3D00:00:00, mailer=3Dlocal, pri=3D30865, =
> dsn=3D5.0.0, stat=3DService unavailable
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: alias MAILER-DAEMON =
> =3D> postmaster
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: alias postmaster =
> =3D> root
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: forward root =3D> =
> zaitsev
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: done; =
> delay=3D00:00:00, ntries=3D1
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: Losing =
> ./qff2D8xOl82884: savemail panic
> Mar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: SYSERR(root): =
> savemail: cannot save rejected email anywhere
> 
> Help me how to power it returns to normal operations?
> Any conclusions is very appreciated.
> 
> Zaitsev Serg, [EMAIL PROTECTED]
> 
> 
> 
> --=_NextPart_000_0171_01C0ABB9.410D6430
> Content-Type: text/html;
>   charset="koi8-r"
> Content-Transfer-Encoding: quoted-printable
> 
> 
> 
> 
> 
> 
> 
> 
> I have upgrade on FreeBSD 3.5 and =
> FreeBSD 4.2 the=20
> Sendmail 8.11.3.On FreeBSD 3.5 all is OK.But on FreeBSD 4.2 I =
> got=20
> trouble. With /usr/local/bin/mail.local or /usr/libexec/mail.local =
> .cat=20
> /var/log/maillogMar 13 11:59:24 gate sendmail[82883]: starting =
> daemon=20
> (8.11.3): SMTP+queueing@00:30:00Mar 13 11:59:24 gate mail.local: =
> setreuid(0,=20
> 1000): Operation not permitted (r=3D1, e=3D1)Mar 13 11:59:24 gate=20
> sendmail[82884]: f2CDpNU76288: to=3Dzaitsev, ctladdr=3D< href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]> (0/0), =
> delay=3D19:08:01,=20
> xdelay=3D00:00:00, mailer=3Dlocal, pri=3D120665, dsn=3D5.0.0, =
> stat=3DService=20
> unavailableMar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: =
> forward=20
> [EMAIL PROTECTED]> =3D> =
> zaitsevMar 13=20
> 11:59:24 gate sendmail[82884]: f2CDpNU76288: f2D8xOl82884: DSN: Service=20
> unavailableMar 13 11:59:24 gate mail.local: setreuid(0, 1000): =
> Operation not=20
> permitted (r=3D1, e=3D1)Mar 13 11:59:24 gate sendmail[82884]: =
> f2D8xOl82884:=20
> to=3Dzaitsev, delay=3D00:00:00, xdelay=3D00:00:00, mailer=3Dlocal, =
> pri=3D30765, dsn=3D5.0.0,=20
> stat=3DService unavailableMar 13 11:59:24 gate sendmail[82884]: =
> f2D8xOl82884:=20
> alias MAILER-DAEMON =3D>postmasterMar 13 11:59:24 gate =
> sendmail[82884]:=20
> f2D8xOl82884: alias postmaster =3D> rootMar 13 11:59:24 gate=20
> sendmail[82884]: f2D8xOl82884: forward root =3D> zaitsevMar 13 =
> 11:59:24=20
> gate sendmail[82884]: f2D8xOl82884: alias postmaster =3D> rootMar =
> 13=20
> 11:59:24 gate sendmail[82884]: f2D8xOl82884: forward root =3D> =
> zaitsevMar=20
> 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: f2D8xOm82884: return to =
> sender:=20
> Service 

Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, Dima Dorfman write
s:
>Hello -hackers
>
>Right now, if you try to detach an md device that's currently mounted,
>you will get a panic (maybe not immedietely, but it will come, esp. 

This is intentional, I want md(4) to mimic the behaviour of "real"
disks as closely as possible, including the fact that it may disappear
without notice or caution.


--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

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



Re: Question regarding the funcation socket()...

2001-03-13 Thread David Malone

On Mon, Mar 12, 2001 at 05:50:05PM -0800, Alfred Perlstein wrote:

> Can you explain _why_ this isn't working, like an error message, maybe?

It doesn't work 'cos the socket library call is not written in C,
so grepping/cscoping won't find it. It is generated from socket.S,
which seems to be produced by a line in src/lib/libc/sys/Makefile.inc
which does:

printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}

That make file includes various other makefiles which produce the
list of syscalls which should be compiled into the library.

David.

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



Re: Question regarding the funcation socket()...

2001-03-13 Thread Alfred Perlstein

* David Malone <[EMAIL PROTECTED]> [010313 03:34] wrote:
> On Mon, Mar 12, 2001 at 05:50:05PM -0800, Alfred Perlstein wrote:
> 
> > Can you explain _why_ this isn't working, like an error message, maybe?
> 
> It doesn't work 'cos the socket library call is not written in C,
> so grepping/cscoping won't find it. It is generated from socket.S,
> which seems to be produced by a line in src/lib/libc/sys/Makefile.inc
> which does:
> 
>   printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
> 
> That make file includes various other makefiles which produce the
> list of syscalls which should be compiled into the library.

David, I was asking Shankar to give more reasonable explanations
as to why things weren't working.  If you check my first message
to him there's the suggestion to do a "make world" and pipe the
output to a file to look for this.

y'know, teach a man to fish... :)

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/


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



Re: Question regarding the funcation socket()...

2001-03-13 Thread David Malone

On Tue, Mar 13, 2001 at 03:45:41AM -0800, Alfred Perlstein wrote:

> David, I was asking Shankar to give more reasonable explanations
> as to why things weren't working.  If you check my first message
> to him there's the suggestion to do a "make world" and pipe the
> output to a file to look for this.

I just reckoned it was a tricky one to find - it took me a few
minutes and I knew what I was looking for...

> y'know, teach a man to fish... :)

Good point - we don't want to set anyone on fire though ;-)

David.

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



RE: non-working fxp cards

2001-03-13 Thread Koster, K.J.

Dear Dennis,

>
> > > in case you havent read my posts, I've fixed the problem 
> > > with mine.
> >
> >Glad to hear it.  In that case, I expect you _NOT_ to use my 
> >new driver.
> 
> And why is that? I thought you just might like some guidance. 
> Feel free to beat on it on your own.
>
I think John made what some cultures would refer to as a "joke". You're
supposed to laugh (you know, the "ha, ha"--kind'a sound).

  Yours,
Kees Jan


 You are only young once,
   but you can stay immature all your life.

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



FreeBSD asm problem

2001-03-13 Thread Nickolay A. Kritsky

Hi all!
It seems to me that you guys are my last hope, but if  i am asking in the
wrong place - sorry.

I wrote my first asm program for FreeBSD:

section.code
global _start
_start:
push dword envp
push dword argvp
push dword fname
mov eax,59  ; execve
int 80h
hlt   ; i should never get here

section .data
fname db '/bin/sh',0
envp dd 0
argvp dd 0
;End of program

after compiling and linking i run it and got SIGBUS error
when run under gdb i can see that int 80h returns with eax=2 (ENOENT? does
it mean file not found?)

I have a feeling that i have missed something very important.

Thank you.
NKritsky - SysAdmin InternetHelp.Ru
http://www.internethelp.ru
e-mail: [EMAIL PROTECTED]



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



join

2001-03-13 Thread Rick Malik
 smime.p7m


Re: FreeBSD asm problem

2001-03-13 Thread Jake Burkholder

> Hi all!
> It seems to me that you guys are my last hope, but if  i am asking in the
> wrong place - sorry.
> 
> I wrote my first asm program for FreeBSD:
> 
> section.code
> global _start
> _start:
> push dword envp
> push dword argvp
> push dword fname
> mov eax,59  ; execve
> int 80h
> hlt   ; i should never get here
> 
> section .data
> fname db '/bin/sh',0
> envp dd 0
> argvp dd 0
> ;End of program
> 
> after compiling and linking i run it and got SIGBUS error
> when run under gdb i can see that int 80h returns with eax=2 (ENOENT? does
> it mean file not found?)
> 
> I have a feeling that i have missed something very important.
> 

www.int80h.org is a good reference for this kind of stuff.

You need to push an additional dword onto the stack after fname.


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



Re: FreeBSD asm problem

2001-03-13 Thread Nickolay A. Kritsky

Thanks a lot for your help!
Now i see that i have read int80h.org's manual not enough well :( (i'm so
stupid!)
RTFM and again RTFM!

NKritsky - SysAdmin InternetHelp.Ru
http://www.internethelp.ru
e-mail: [EMAIL PROTECTED]



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



Re: FreeBSD asm problem

2001-03-13 Thread milunovic

-BEGIN PGP SIGNED MESSAGE-

On Tue, 13 Mar 2001, Nickolay A. Kritsky wrote:

> Hi all!
> It seems to me that you guys are my last hope, but if  i am asking in the
> wrong place - sorry.
> 
> I wrote my first asm program for FreeBSD:
> 
> section.code
> global _start
> _start:
> push dword envp
> push dword argvp
> push dword fname
> mov eax,59  ; execve

Here you must push long (dword) because int 0x80 expects EIP

main :
 pushl 3rd
 pushl 2nd
 pushl 1st
 call execve  <--- call will push EIP on stack 

execve :
  leal $0x3b,%eax
  int $0x80

Stack should be ->
[EIP][1st][2nd][3rd] but instead EIP you can just push anything you
want.

Vojislav Milunovic
[EMAIL PROTECTED]

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQEVAwUBOq486y3gPLld8IkLAQEy2gf9HLvwmii7QTyNuHBt6qQqf5jBqMPFPw8j
kcW/5Oss05kfayh6tmrLVRCzP3MYNYXXKSgxjAKzH+OmN/FHlaTsZIIfQFnU561z
a1Qau+CWjJ5hUuIfE1xGPPVDaWC8e3MF83ZwH9CN3pnIZVUh/3OectyiTGwgwyEV
iGo65HAlgW9GBZznmzYK7PXOkWrRV3olcflIverL1dKMZbow0MCOQ57LMLnNY4ck
Kl6dt8lVLd+K1sHnXdO09eqogiyXPmJEmIJJGRiR2iKMo3Zl5ptGfN/pb00NnNiT
5eNeOQbVEmDJg0swig6VrY2kSqUsMjCpWFW2TDItvtUp8nW9uJ1mtA==
=6Qs3
-END PGP SIGNATURE-



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



Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Zaitsev Serg




I got perfect advice and my problem is no 
more.
I have upgrade the Sendmail 8.11.3 on FreeBSD 
4.2.But on FreeBSD 4.2 I got trouble with /usr/libexec/mail.local 
.
Filling up /var/spool/mqueue a lot of files.
/var/mail/user was empty.

Mail stopped.
 
chmod u+s /usr/libexec/mail.local
 
Now mail works again.
 
Zaitsev Serg, [EMAIL PROTECTED]
P.S.: I had the Tones of messages 
like this:cat /var/log/maillogMar 13 11:59:24 gate 
sendmail[82883]: starting daemon (8.11.3): SMTP+queueing@00:30:00Mar 13 
11:59:24 gate mail.local: setreuid(0, 1000): Operation not permitted (r=1, 
e=1)Mar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: to=zaitsev, 
ctladdr=<[EMAIL PROTECTED]> (0/0), 
delay=19:08:01, xdelay=00:00:00, mailer=local, pri=120665, dsn=5.0.0, 
stat=Service unavailableMar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: 
forward <[EMAIL PROTECTED]> => 
zaitsevMar 13 11:59:24 gate sendmail[82884]: f2CDpNU76288: f2D8xOl82884: 
DSN: Service unavailableMar 13 11:59:24 gate mail.local: setreuid(0, 1000): 
Operation not permitted (r=1, e=1)Mar 13 11:59:24 gate sendmail[82884]: 
f2D8xOl82884: to=zaitsev, delay=00:00:00, xdelay=00:00:00, mailer=local, 
pri=30765, dsn=5.0.0, stat=Service unavailableMar 13 11:59:24 gate 
sendmail[82884]: f2D8xOl82884: alias MAILER-DAEMON =>postmasterMar 13 
11:59:24 gate sendmail[82884]: f2D8xOl82884: alias postmaster => rootMar 
13 11:59:24 gate sendmail[82884]: f2D8xOl82884: forward root => 
zaitsevMar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: alias postmaster 
=> rootMar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: forward root 
=> zaitsevMar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: 
f2D8xOm82884: return to sender: Service unavailableMar 13 11:59:24 gate 
mail.local: setreuid(0, 1000): Operation not permitted (r=1, e=1)Mar 13 
11:59:24 gate sendmail[82884]: f2D8xOm82884: to=zaitsev, delay=00:00:00, 
xdelay=00:00:00, mailer=local, pri=30865, dsn=5.0.0, stat=Service 
unavailableMar 13 11:59:24 gate sendmail[82884]: f2D8xOm82884: alias 
MAILER-DAEMON => postmasterMar 13 11:59:24 gate sendmail[82884]: 
f2D8xOm82884: alias postmaster => rootMar 13 11:59:24 gate 
sendmail[82884]: f2D8xOm82884: forward root => zaitsevMar 13 11:59:24 
gate sendmail[82884]: f2D8xOm82884: done; delay=00:00:00, ntries=1Mar 13 
11:59:24 gate sendmail[82884]: f2D8xOl82884: Losing ./qff2D8xOl82884: savemail 
panicMar 13 11:59:24 gate sendmail[82884]: f2D8xOl82884: SYSERR(root): 
savemail: cannot save rejected email 
anywhere


Re: FreeBSD asm problem

2001-03-13 Thread diman


ex.S
#include 
.globl  main
main:   popl%eax/* cick ret */
popl%eax/* cick argc */
movl(%esp),%eax /* eax=av */
movl$fname, %ebx/* ebx=fname */
movl%ebx,(%eax) /* av[0]=fname */
pushl   %ebx/* needs to be on the stack too */
movl$SYS_execve,%eax/* execve */
callsyscall
movl$SYS_exit,%eax  /* exit */
callsyscall
syscall:
int $0x80
ret
fname:  .asciz  "/bin/sh"


On Tue, 13 Mar 2001, Nickolay A. Kritsky wrote:

> Hi all!
> It seems to me that you guys are my last hope, but if  i am asking in the
> wrong place - sorry.
> 
> I wrote my first asm program for FreeBSD:
> 
> section.code
> global _start
> _start:
> push dword envp
> push dword argvp
> push dword fname
> mov eax,59  ; execve
> int 80h
> hlt   ; i should never get here
> 
> section .data
> fname db '/bin/sh',0
> envp dd 0
> argvp dd 0
> ;End of program
> 
> after compiling and linking i run it and got SIGBUS error
> when run under gdb i can see that int 80h returns with eax=2 (ENOENT? does
> it mean file not found?)
> 
> I have a feeling that i have missed something very important.
> 
> Thank you.
> NKritsky - SysAdmin InternetHelp.Ru
> http://www.internethelp.ru
> e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 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: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread David O'Brien

On Tue, Mar 13, 2001 at 06:26:29PM +0300, Zaitsev Serg wrote:
> I have upgrade the Sendmail 8.11.3 on FreeBSD 4.2.
> But on FreeBSD 4.2 I got trouble with /usr/libexec/mail.local .
> Filling up /var/spool/mqueue a lot of files.
> /var/mail/user was empty.
> Mail stopped.
> 
> chmod u+s /usr/libexec/mail.local
> 
> Now mail works again.

Perhaps you should read the documentation we supplied on this issue.


bash$ cat /usr/src/UPDATING
Updating Information for FreeBSD STABLE users

This file is maintained by [EMAIL PROTECTED]  Please send new entries
directly to him.  See end of file for further details.  A reverse
chronology since 4.0 was released is included, followed by the common
items quick how-tos, followed by entries for versions of -current
prior to 4.0 Release.

..snip..

20001020:
** WARNING **
Sendmail has been updated.
** WARNING **
o mail.local(8) is no longer installed as a set-user-id binary.

..snip..

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



Re: optimizing apache with php and nfs mounts

2001-03-13 Thread David O'Brien

On Mon, Mar 12, 2001 at 10:34:32PM -0800, Gordon Tetlow wrote:
> On Mon, 12 Mar 2001, Dan Phoenix wrote:
> 
> > CC="gcc -O6 -fomit-frame-pointer" OPTIM="-O2 -DBUFFERED_LOGS"
> >
> > could some c guru tell me if this would be bad to use to an apache
> > optimization? I need to compile apache on my own not with ports
> > looking at makefile
> > in apache13 in ports collection i see these optimization flags.
> > along with --mmap-static module.
> >
> >
> > can you use both -06 and -02 for optmization at the same time?
> > -fomit-frame-pointer as well?
> 
> -O6 and -O2 do seem a bit contradictory. I'm guessing it just uses -O6.
> -fomit-frame-pointer is not enabled per the -O flags so that does do
> something, but it does make it rather difficult to track down problems
> without a frame pointer.

 _   _  
 __/\_____  (_)   __ _  | |__ __/\__
 \/   / __| | |  / _` | | '_ \\/
 /_  _\   \__ \ | | | (_| | | | | |   /_  _\
   \/ |___/ |_|  \__, | |_| |_| \/  
 |___/  

Where did you even get the idea "-O6" did *_ANYTHING_*??  Don't people
ever read the documentation anymore.  

1.  The highest -O setting GCC accepts is "-O3".
2.  The base, system C compiler is known to produce bad code with -O2.
We have been proclaiming this since as long as I have been with the
Project.

> I probably qualify for the latter Optimizations are good and all, but
> I look at it this way: It's a mission critical webserver, I don't want it
> crashing. As a result, we compile ours with nothing higher that -O2 and no
> unusual optimizations. Sure, it might be a bit slower than it could have
> been,

Do people ever actually test this?  Or is there just the assumption that
the more "optimizations" on the `cc' command line is a Great Thing(tm)?
People do realize that for some code, -O2 is much worse than -O?  Also
for much code there is no difference in performance.  Rather than do what
you "think" will give the best results, why not actually benchmark it?

> but we don't have to worry about chasing down compiler bugs that
> interact strangly with the webserver code. Also, I think anything higher
> than -O2 actually produces a larger binary (it inlines functions whenever
> possible).

1.  You need to use -O if you don't want to chase bugs
2.  It is -O2 and above (ie, _includes_ -O2) that produces a larger
binary.  See -Os if you want smaller.

-- 
-- David  ([EMAIL PROTECTED])
  GNU is Not Unix / Linux Is Not UniX

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Zaitsev Serg

You right.
But I spend more time than I wish for detection, analyzing, consulting and
solving problem.

"mail.local is no longer installed as a set-user-id binary"

Is it good? Is it bad?

Who knows I get it some way.

Thanks, Zaitsev Serg, [EMAIL PROTECTED]

> > chmod u+s /usr/libexec/mail.local
>
> Perhaps you should read the documentation we supplied on this issue.
>
>
> bash$ cat /usr/src/UPDATING
> Updating Information for FreeBSD STABLE users
>
> This file is maintained by [EMAIL PROTECTED]  Please send new entries
> directly to him.  See end of file for further details.  A reverse
> chronology since 4.0 was released is included, followed by the common
> items quick how-tos, followed by entries for versions of -current
> prior to 4.0 Release.
>
> ..snip..
>
> 20001020:
> ** WARNING **
> Sendmail has been updated.
> ** WARNING **
> o mail.local(8) is no longer installed as a set-user-id binary.
>
> ..snip..
>


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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Warner Losh

In message <5663.984480931@critter> Poul-Henning Kamp writes:
: In message <[EMAIL PROTECTED]>, Dima Dorfman write
: s:
: >Hello -hackers
: >
: >Right now, if you try to detach an md device that's currently mounted,
: >you will get a panic (maybe not immedietely, but it will come, esp. 
: 
: This is intentional, I want md(4) to mimic the behaviour of "real"
: disks as closely as possible, including the fact that it may disappear
: without notice or caution.

We should then fix the rest of the system to deal with disks that
disappear without notice.

Warner

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



RE: optimizing apache with php and nfs mounts

2001-03-13 Thread Koster, K.J.

> 
>  _   _  
>  __/\_____  (_)   __ _  | |__ __/\__
>  \/   / __| | |  / _` | | '_ \\/
>  /_  _\   \__ \ | | | (_| | | | | |   /_  _\
>\/ |___/ |_|  \__, | |_| |_| \/  
>  |___/  
>
>
:-)

> 
> Where did you even get the idea "-O6" did *_ANYTHING_*??  Don't people
> ever read the documentation anymore.  
>
On top of that: the subject line suggests that NFS is involved in the
equation. Are you sure you're cpu-bound and aren't losing lots of time
getting files from the NFS server?

Kees Jan


 You are only young once,
   but you can stay immature all your life.

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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, Warner Losh writ
es:
>In message <5663.984480931@critter> Poul-Henning Kamp writes:
>: In message <[EMAIL PROTECTED]>, Dima Dorfman write
>: s:
>: >Hello -hackers
>: >
>: >Right now, if you try to detach an md device that's currently mounted,
>: >you will get a panic (maybe not immedietely, but it will come, esp. 
>: 
>: This is intentional, I want md(4) to mimic the behaviour of "real"
>: disks as closely as possible, including the fact that it may disappear
>: without notice or caution.
>
>We should then fix the rest of the system to deal with disks that
>disappear without notice.

That was the point yes :-)

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Warner Losh

In message <8773.984501263@critter> Poul-Henning Kamp writes:
: >We should then fix the rest of the system to deal with disks that
: >disappear without notice.
: 
: That was the point yes :-)

Cool.  When this happens, the forgetful ata flash ejectors of the
world will be happy :-)

Warner

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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Soren Schmidt

It seems Warner Losh wrote:
> In message <8773.984501263@critter> Poul-Henning Kamp writes:
> : >We should then fix the rest of the system to deal with disks that
> : >disappear without notice.
> : 
> : That was the point yes :-)
> 
> Cool.  When this happens, the forgetful ata flash ejectors of the
> world will be happy :-)

The next commit to the ATA driver will take care off this, either
by the user doing 'atacontrol detach dev' or by the timeout code
discovering that a divice went missing and proberly fail all the
outstanding bio requests..

This all needed the patch to subr_disk.c that I made earlier today,
but now we can actually do it, however some of the cleanup action
should be done by the higher levels and not by the device driver...

-Søren

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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Warner Losh

In message <[EMAIL PROTECTED]> Soren Schmidt writes:
: This all needed the patch to subr_disk.c that I made earlier today,
: but now we can actually do it, however some of the cleanup action
: should be done by the higher levels and not by the device driver...

Most of the crashes I've seen are in the higher levels...

Warner

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



Re: optimizing apache with php and nfs mounts

2001-03-13 Thread Gordon Tetlow

On Tue, 13 Mar 2001, David O'Brien wrote:

> On Mon, Mar 12, 2001 at 10:34:32PM -0800, Gordon Tetlow wrote:
>  _   _
>  __/\_____  (_)   __ _  | |__ __/\__
>  \/   / __| | |  / _` | | '_ \\/
>  /_  _\   \__ \ | | | (_| | | | | |   /_  _\
>\/ |___/ |_|  \__, | |_| |_| \/
>  |___/

Woohoo! ASCII art!

> > I probably qualify for the latter Optimizations are good and all, but
> > I look at it this way: It's a mission critical webserver, I don't want it
> > crashing. As a result, we compile ours with nothing higher that -O2 and no
> > unusual optimizations. Sure, it might be a bit slower than it could have
> > been,
>
> Do people ever actually test this?  Or is there just the assumption that
> the more "optimizations" on the `cc' command line is a Great Thing(tm)?
> People do realize that for some code, -O2 is much worse than -O?  Also
> for much code there is no difference in performance.  Rather than do what
> you "think" will give the best results, why not actually benchmark it?

I was just trying to illustrate that any gains (real or not) realized by
using -O1000 -fomit-everything is generally a trade off between stability
and speed.

> > but we don't have to worry about chasing down compiler bugs that
> > interact strangly with the webserver code. Also, I think anything higher
> > than -O2 actually produces a larger binary (it inlines functions whenever
> > possible).
>
> 1.  You need to use -O if you don't want to chase bugs
> 2.  It is -O2 and above (ie, _includes_ -O2) that produces a larger
> binary.  See -Os if you want smaller.

Actually, we did. Of course, our production stuff is still compiled with
gcc 2.7.2.1. I think. Whatever the standard system compiler for
FreeBSD-3.2 is. And that was at a time when the world was still compiled
with -O2, wasn't it?

-gordon


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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Soren Schmidt

It seems Warner Losh wrote:
> In message <[EMAIL PROTECTED]> Soren Schmidt writes:
> : This all needed the patch to subr_disk.c that I made earlier today,
> : but now we can actually do it, however some of the cleanup action
> : should be done by the higher levels and not by the device driver...
> 
> Most of the crashes I've seen are in the higher levels...

Where ? I havn't seen any here for quite some time...

-Søren

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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread Warner Losh

In message <[EMAIL PROTECTED]> Soren Schmidt writes:
: It seems Warner Losh wrote:
: > In message <[EMAIL PROTECTED]> Soren Schmidt writes:
: > : This all needed the patch to subr_disk.c that I made earlier today,
: > : but now we can actually do it, however some of the cleanup action
: > : should be done by the higher levels and not by the device driver...
: > 
: > Most of the crashes I've seen are in the higher levels...
: 
: Where ? I havn't seen any here for quite some time...

The ones I've been seeing on "eject ata when mounted on /foo" are in
the vm code or file system code.  I'll try it again after your changes
to see where we're at.

Warner

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



Re: examining the environment

2001-03-13 Thread bruno schwander

Thanks everybody,

I checked the code and the magic function is

kvm_getenvv()


bruno

Wes Peters wrote:

> bruno schwander wrote:
> >
> > Hi everybody,
> >
> > How can I examine an other process environment ?
> >
> > I have a daemon that needs to do something according to an environment
> > variable set in a different process. Can I open an other process and lookup
> > environment variables set in his space ?
>
> ps can do this, check it's code.
>
> --
>Where am I, and what am I doing in this handbasket?
>
> Wes Peters [EMAIL PROTECTED]

--

###

Bruno Schwander
Senior Software Engineer

Worldgate Communications, Inc

email: [EMAIL PROTECTED]






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



gcc optimization problems (RE: optimizing apache with php and nfs mounts)

2001-03-13 Thread Charles Randall

From: David O'Brien [mailto:[EMAIL PROTECTED]]
>2.  The base, system C compiler is known to produce bad code with -O2.
>We have been proclaiming this since as long as I have been with the
>Project.

Is this an issue with FreeBSD's gcc's or gcc in general? If gcc in general,
are there open PRs on this issue?

Charles

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



Re: Patch to fix panic when detaching a mounted md device

2001-03-13 Thread John Baldwin


On 13-Mar-01 Warner Losh wrote:
> In message <5663.984480931@critter> Poul-Henning Kamp writes:
>: In message <[EMAIL PROTECTED]>, Dima Dorfman
>: write
>: s:
>: >Hello -hackers
>: >
>: >Right now, if you try to detach an md device that's currently mounted,
>: >you will get a panic (maybe not immedietely, but it will come, esp. 
>: 
>: This is intentional, I want md(4) to mimic the behaviour of "real"
>: disks as closely as possible, including the fact that it may disappear
>: without notice or caution.
> 
> We should then fix the rest of the system to deal with disks that
> disappear without notice.

At the very least the md code should propagate an error back up to the top
level and not panic.

> Warner

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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



Re: gcc optimization problems (RE: optimizing apache with php andnfs mounts)

2001-03-13 Thread Rik van Riel

On Tue, 13 Mar 2001, Charles Randall wrote:
> From: David O'Brien [mailto:[EMAIL PROTECTED]]
> >2.  The base, system C compiler is known to produce bad code with -O2.
> >We have been proclaiming this since as long as I have been with the
> >Project.
> 
> Is this an issue with FreeBSD's gcc's or gcc in general? If gcc in
> general, are there open PRs on this issue?

It's a gcc thing. Linux is having the same problems every once
in a while (currently there only seem to be _2_ gcc versions
which generate correct code for the Linux kernel ...).

OTOH, it is possible to work around gcc problems in the code
and code which was initially written for older gcc versions
often rely on things which were true in older gcc versions
but are no longer true currently ...

(especially things depending on certain ordering of instructions
and the (non-)presence of memory barriers)

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/   http://distro.conectiva.com.br/


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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Jonathan Chen

On Tue, Mar 13, 2001 at 06:26:29PM +0300, Zaitsev Serg wrote:
> I got perfect advice and my problem is no more.
> I have upgrade the Sendmail 8.11.3 on FreeBSD 4.2.
> But on FreeBSD 4.2 I got trouble with /usr/libexec/mail.local .
> Filling up /var/spool/mqueue a lot of files.
> /var/mail/user was empty.
> Mail stopped.
> 
> chmod u+s /usr/libexec/mail.local

That's not the right fix. Incidentally, the right place to ask this is
[EMAIL PROTECTED]; and this question has been answered
quite a few times by me. Check out the archives.
-- 
Jonathan Chen <[EMAIL PROTECTED]>
--
  If you're right 90% of the time, why quibble about the remaining 3%?

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



Re: optimizing apache with php and nfs mounts

2001-03-13 Thread Alex Zepeda

On Tue, Mar 13, 2001 at 07:41:40AM -0800, David O'Brien wrote:

> Where did you even get the idea "-O6" did *_ANYTHING_*??  Don't people
> ever read the documentation anymore.  

Well, yes.  But I think that with the pgcc patches floating around that do
use -ON N <= 9 or so.. people might get confused.

> Do people ever actually test this?  Or is there just the assumption that
> the more "optimizations" on the `cc' command line is a Great Thing(tm)?

Yes.

> People do realize that for some code, -O2 is much worse than -O?  Also
> for much code there is no difference in performance.  Rather than do what
> you "think" will give the best results, why not actually benchmark it?

Well, yes.  I was actually curious about this, and if you search the gcc
ml archives (gcc.gnu.org) there are people who've been working on this.  
There was an interesting example of some fp code compiled with -O, -O2,
-O2 -fomit-frame-pointer.  With the extra register saved with
-fomit-frame-pointer -O2 was able to do some neat stuff.

Of course -O2 turns on most of the optimizations, but I wonder which ones
are causing incorrect code generation, and which ones really do help.  
Hmm.

- alex

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



Re: optimizing apache with php and nfs mounts

2001-03-13 Thread Alfred Perlstein

* Alex Zepeda <[EMAIL PROTECTED]> [010313 12:25] wrote:
> On Tue, Mar 13, 2001 at 07:41:40AM -0800, David O'Brien wrote:
> 
> > Where did you even get the idea "-O6" did *_ANYTHING_*??  Don't people
> > ever read the documentation anymore.  
> 
> Well, yes.  But I think that with the pgcc patches floating around that do
> use -ON N <= 9 or so.. people might get confused.
> 
> > Do people ever actually test this?  Or is there just the assumption that
> > the more "optimizations" on the `cc' command line is a Great Thing(tm)?
> 
> Yes.

Well... when you 'gzip -9' something, it just takes longer, it doesn't
sometimes corrupt your data (afaik).

So it sort of makes sense for people to assume that when the compiler
advertises certain things that it's going to do it perhaps not
in the most effecient manner, but at least correctly.

> Of course -O2 turns on most of the optimizations, but I wonder which ones
> are causing incorrect code generation, and which ones really do help.  
> Hmm.

SO are the gcc developers i imagine. :)

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/


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



Re: optimizing apache with php and nfs mounts

2001-03-13 Thread David O'Brien

On Tue, Mar 13, 2001 at 10:08:00AM -0800, Gordon Tetlow wrote:
> Actually, we did. Of course, our production stuff is still compiled with
> gcc 2.7.2.1. I think. Whatever the standard system compiler for
> FreeBSD-3.2 is. And that was at a time when the world was still compiled
> with -O2, wasn't it?

The world has _NEVER_ been compiled at -O2 by default, nor has it ever
been officially recommended.

-- 
-- David  ([EMAIL PROTECTED])
  GNU is Not Unix / Linux Is Not UniX

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



Re: ecc kld for FreeBSD 4.2

2001-03-13 Thread Chris Dillon

On Mon, 12 Mar 2001, Chris Sears wrote:

>
> Linux has some support for ECC error detection:
>
> http://www.anime.net/~goemon/linux-ecc/
>
> I've ported ECC 0.12 to a FreeBSD kld and it seems to work.
>
> A  couple of minor changes:
>
>commented out probe_450gx because the compiler was
>giving some plausible warnings
>
>check if ecc_mode == ECC_NONE before installing the timer
>
> I've attached it and would welcome any comments. I've also
> posted it back to the Linux ECC people.

Excellent!! I've just compiled it and loaded it on my 4.2-STABLE
system with a 440BX-based board.  I even have an enhancement already,
which is pretty much just a cut-n-paste from the Linux bits with a
little bit of style enhancement, though you'll want to change it to
your liking, and since I'm not an avid C programmer, make sure I've
done the right stuff...  (it DOES work, at least):

--- ecc.c.orig  Tue Mar 13 15:17:57 2001
+++ ecc.c   Tue Mar 13 16:31:02 2001
@@ -1040,6 +1040,26 @@
int type,
void*   data)
 {
+char *ecc[] = {
+   "None",
+   "Reserved",
+   "Parity checking",
+   "ECC detection",
+   "ECC detection and correction",
+   "ECC with hardware scrubber"
+   };
+char *dram[] = {
+   "Empty",
+   "Reserved",
+   "FPM",
+   "EDO",
+   "BEDO",
+   "SDR",
+   "DDR",
+   "RDR"
+   };
+   unsigned long mem_end = 0;
+   unsigned long last_mem = 0;
static int  attached = 0;
int loop;

@@ -1068,6 +1088,25 @@
if (cs.ecc_mode == ECC_NONE) {
printf("ECC: no ECC memory\n");
return -ENODEV;
+   } else {
+   printf("ECC: Chipset ECC capability - %s\n",
+   ecc[cs.ecc_cap]);
+   printf("ECC: Current ECC mode - %s\n",
+   ecc[cs.ecc_mode]);
+   printf("ECC:\tBank\tSize\tType\tECC\tSBE\tMBE\n");
+   for (loop = 0; loop < 8; loop++) {
+   last_mem = bank[loop].endaddr;
+   if (last_mem > mem_end) {
+   printf("ECC:\t%d\t", loop);
+   printf("%dM\t", (int)(last_mem - mem_end) / 
+1048576);
+   printf("%s\t", dram[bank[loop].mtype]);
+   printf("%s\t", bank[loop].eccmode ? "Y" : "N");
+   printf("%d\t", bank[loop].sbecount);
+   printf("%d\n", bank[loop].mbecount);
+   mem_end = last_mem;
+   }
+   }
+   printf("ECC: Total\t%dM\n", (int)mem_end / 1048576);
}
attached = 1;
break;


I also have something that I can hopefully just plug the bits into to
get this working for the ServerWorks III chipset, as well, assuming I
can find the right info about it...


-- Chris Dillon - [EMAIL PROTECTED] - [EMAIL PROTECTED]
   FreeBSD: The fastest and most stable server OS on the planet.
   For IA32 and Alpha architectures. IA64, PPC, and ARM under development.
   http://www.freebsd.org



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



Re: ecc kld for FreeBSD 4.2

2001-03-13 Thread Chris Dillon

On Mon, 12 Mar 2001, Chris Sears wrote:

> I've ported ECC 0.12 to a FreeBSD kld and it seems to work.

Oh yeah, I don't see a license on this file.  If the author has no
problems with putting a BSD license on this, this would be great to
stick in RELENG_4 and HEAD for the many of us who actually use ECC
systems. :-)


-- Chris Dillon - [EMAIL PROTECTED] - [EMAIL PROTECTED]
   FreeBSD: The fastest and most stable server OS on the planet.
   For IA32 and Alpha architectures. IA64, PPC, and ARM under development.
   http://www.freebsd.org



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



Copying user <---> kernel

2001-03-13 Thread Rohit Rakshe

Hello,

I am sure people have thought about this one, but just that I could not
find any discussions about it:

Consider a server which receives data over network, does some operations
on the data and sends it back over the network. The kernel could spent
most of its time copying data to and from user space. (the operations are
performed in the user space).

The following can be done to avoid this overhead:

Say, I want to copy a page from user space to kernel, I can just pin it in
physical memory; then attach it to kernel page table. (similar thing for
other way round).

Is this kinda thing implemented ? If not, is it feasible ?

Thanks everyone !

- Rohit



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



Re: Copying user <---> kernel

2001-03-13 Thread Kenneth D. Merry

On Tue, Mar 13, 2001 at 19:41:50 -0600, Rohit Rakshe wrote:
> Hello,
> 
> I am sure people have thought about this one, but just that I could not
> find any discussions about it:
> 
> Consider a server which receives data over network, does some operations
> on the data and sends it back over the network. The kernel could spent
> most of its time copying data to and from user space. (the operations are
> performed in the user space).
> 
> The following can be done to avoid this overhead:
> 
> Say, I want to copy a page from user space to kernel, I can just pin it in
> physical memory; then attach it to kernel page table. (similar thing for
> other way round).
> 
> Is this kinda thing implemented ? If not, is it feasible ?

Yes, it has been done.  See:

http://people.FreeBSD.org/~ken/zero_copy/

The version of the patches linked off the page isn't the latest, the latest
is here:

http://people.FreeBSD.org/~ken/zero_copy/zero_copy.diffs.20010124

Those diffs are against -current as of January 24th.  I can probably supply
diffs against a newer version of -current if you need 'em.

The NFS code isn't ready for prime time, I need to rip that out and clean
up some mutex issues before the code can go into -current.

Ken
-- 
Kenneth Merry
[EMAIL PROTECTED]

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Greg Black

"David O'Brien" writes:

| Perhaps you should read the documentation we supplied on this issue.
| 
| bash$ cat /usr/src/UPDATING

Hmmm...

$ uname -rs
FreeBSD 4.2-RELEASE
$ cat /usr/src/UPDATING
cat: /usr/src/UPDATING: No such file or directory

Perhaps the documentation should be installed more thoroughly.

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Dan Langille

On 14 Mar 2001, at 11:57, Greg Black wrote:

> "David O'Brien" writes:
> 
> | Perhaps you should read the documentation we supplied on this issue.
> | 
> | bash$ cat /usr/src/UPDATING
> 
> Hmmm...
> 
> $ uname -rs
> FreeBSD 4.2-RELEASE
> $ cat /usr/src/UPDATING
> cat: /usr/src/UPDATING: No such file or directory
> 
> Perhaps the documentation should be installed more thoroughly.

Perhaps you should install the documentation.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Greg Black

"Dan Langille" writes:

| On 14 Mar 2001, at 11:57, Greg Black wrote:
| 
| > "David O'Brien" writes:
| > 
| > | Perhaps you should read the documentation we supplied on this issue.
| > | 
| > | bash$ cat /usr/src/UPDATING
| > 
| > Hmmm...
| > 
| > $ uname -rs
| > FreeBSD 4.2-RELEASE
| > $ cat /usr/src/UPDATING
| > cat: /usr/src/UPDATING: No such file or directory
| > 
| > Perhaps the documentation should be installed more thoroughly.
| 
| Perhaps you should install the documentation.

I chose something that implied documentation on the sysinstall
menu; it didn't install that file.

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Dan Langille

On 14 Mar 2001, at 12:05, Greg Black wrote:

> "Dan Langille" writes:
> 
> | On 14 Mar 2001, at 11:57, Greg Black wrote:
> | 
> | > "David O'Brien" writes:
> | > 
> | > | Perhaps you should read the documentation we supplied on this issue.
> | > | 
> | > | bash$ cat /usr/src/UPDATING
> | > 
> | > Hmmm...
> | > 
> | > $ uname -rs
> | > FreeBSD 4.2-RELEASE
> | > $ cat /usr/src/UPDATING
> | > cat: /usr/src/UPDATING: No such file or directory
> | > 
> | > Perhaps the documentation should be installed more thoroughly.
> | 
> | Perhaps you should install the documentation.
> 
> I chose something that implied documentation on the sysinstall
> menu; it didn't install that file.

There is more documentation than what sysinstall gives you.  The 
documentation in question is useful for people who are updating their 
system, say from 4.2-RELEASE to 4.2-STABLE.  Hence the name of 
the file in question.  You don't have that file because you don't need it.  
If you were upgrading to 4.2-STABLE, this file would be installed as part 
of the cvsup step of your upgrade.

If you are still interested in this file, you can obtain the latest version of 
this file at:

http://www.FreeBSD.org/cgi/cvsweb.cgi/~checkout~/src/UPDATING?rev
=HEAD

That's what you want.  When I said "the", I meant /usr/src/UPDATING.  
That's what David O'Brien was referring to.

-- 
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php
got any work?  I'm looking for some.

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Greg Black

"Dan Langille" writes:

| On 14 Mar 2001, at 12:05, Greg Black wrote:
| 
| > "Dan Langille" writes:
| > 
| > | On 14 Mar 2001, at 11:57, Greg Black wrote:
| > | 
| > | > "David O'Brien" writes:
| > | > 
| > | > | Perhaps you should read the documentation we supplied on this issue.
| > | > | 
| > | > | bash$ cat /usr/src/UPDATING
| > | > 
| > | > Hmmm...
| > | > 
| > | > $ uname -rs
| > | > FreeBSD 4.2-RELEASE
| > | > $ cat /usr/src/UPDATING
| > | > cat: /usr/src/UPDATING: No such file or directory
| > | > 
| > | > Perhaps the documentation should be installed more thoroughly.
| > | 
| > | Perhaps you should install the documentation.
| > 
| > I chose something that implied documentation on the sysinstall
| > menu; it didn't install that file.
| 
| There is more documentation than what sysinstall gives you.  The 
| documentation in question is useful for people who are updating their 
| system, say from 4.2-RELEASE to 4.2-STABLE.  Hence the name of 
| the file in question.  You don't have that file because you don't need it.  

This is the point where we disagree.  The information in this
file is in fact of interest to somebody who does a fresh install
from CD as the simple way to upgrade from an earlier release.
I'm saying that I think this information should be included as
part of any installation, not just in the limited cases that are
the case at present.

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread David O'Brien

On Wed, Mar 14, 2001 at 11:57:51AM +1000, Greg Black wrote:
> $ uname -rs
> FreeBSD 4.2-RELEASE
> $ cat /usr/src/UPDATING
> cat: /usr/src/UPDATING: No such file or directory
> 
> Perhaps the documentation should be installed more thoroughly.

If one is building and installing a new [latest] sendmail, they have
/usr/src populated.  Or was the new Sendmail compiled manually and
installed using sources downloaded manually from ftp.sendmail.org?
If so, then this whole discussion should be on a sendmail.org list, not
FreeBSD one.
 
-- 
-- David  ([EMAIL PROTECTED])
  GNU is Not Unix / Linux Is Not UniX

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread David O'Brien

On Wed, Mar 14, 2001 at 12:27:02PM +1000, Greg Black wrote:
> This is the point where we disagree.  The information in this
> file is in fact of interest to somebody who does a fresh install
> from CD as the simple way to upgrade from an earlier release.

Huh???  If you do a fresh install from CD, you will get a
sendmail+sendmail.cf+mail.local that are all in sync and setup properly.

This thread (unless I majorly misunderstood it), is about someone taking
a 4.x-RELEASE system and upgrading the sendmail to the latest 4-STABLE
version.

-- 
-- David  ([EMAIL PROTECTED])
  GNU is Not Unix / Linux Is Not UniX

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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Greg Black

"David O'Brien" writes:

| On Wed, Mar 14, 2001 at 12:27:02PM +1000, Greg Black wrote:
| > This is the point where we disagree.  The information in this
| > file is in fact of interest to somebody who does a fresh install
| > from CD as the simple way to upgrade from an earlier release.
| 
| Huh???  If you do a fresh install from CD, you will get a
| sendmail+sendmail.cf+mail.local that are all in sync and setup properly.

I'm sure that's true; my point was that you don't get the useful
information that you pointed out in "/usr/src/UPDATING", since
that file only gets installed in some situations.  I'm trying to
make a case for that file (or the information it contains) to be
part of every fresh install.

| This thread (unless I majorly misunderstood it), is about someone taking
| a 4.x-RELEASE system and upgrading the sendmail to the latest 4-STABLE
| version.

It was about that, but has drifted a bit since then.  I'm sorry
if I allowed this to become unclear.

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



pcm audio wierdness on via mobo

2001-03-13 Thread James Halstead

System has a via 686A southbridge with the integrated sound hardware. It
gets detected
properly by the pcm driver, however the playback is slightly fast. Is there
some type of
adjustment to slow it down a little bit? I can gather whatever info needed
on request,
Just tell me what to get.The sound does work fine in winblows 98.

Intel pIII 733, via 694x north bridge, 686A south bridge
Freebsd 4.3-BETA from a couple days ago
Happens no matter how I am playing audio (xmms, mp3blaster, or directly
playing a wav file)

Thanks for any help.

James


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



Help!!! 2nd HD gone

2001-03-13 Thread mike . mcclain

Howdy,

fbsd:~> uname -a
FreeBSD playground 3.4-RELEASE FreeBSD 3.4-RELEASE #1: Sun Mar 26
16:56:35 PST
 2000 root@:/usr/src/sys/compile/McKERNEL  i386

>From dmesg:
CPU: Pentium/P55C (167.05-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x543  Stepping = 3
  Features=0x8001bf
real memory  = 33554432 (32768K bytes)
chip0:  rev 0x01 on pci0.0.0
chip1:  rev 0x01 on pci0.7.0
ide_pci0:  rev 0x01 on pci0.7.1
chip2:  rev 0x01 on pci0.7.3
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wdc1 not found at 0x170

This makes me think the kernal is not seeing the controller at boot.

from /sys/i386/conf/McKERNEL:
controller  wdc0at isa? port "IO_WD1" bio irq 14
controller  wdc1at isa? port "IO_WD2" bio irq 15
from /usr/src/sys/i386/isa/isa.h:
#define IO_WD1  0x1F0 /* Primary Fixed Disk Controller */
#define IO_WD2  0x170 /* Secondary Fixed Disk Controller */

wd2 aka D: aka /dev/hdc is visible from dos and I'm writing this from
Slackware 7.0 mounted on /dev/hdc8.

This from Slackware's /var/log/messages:
Mar  7 13:28:39 playground kernel:
hda: WDC AC24300L, 4112MB w/256kB Cache, CHS=524/255/63, UDMA
Mar  7 13:28:39 playground kernel:
hdc: WDC AC26400R, 6149MB w/512kB Cache, CHS=13328/15/63, (U)DMA

I once had several slices on wd2s* mounted in /etc/fstab but that
doesn't work today. I'm fairly this is something I broke in FreeBSD
but can't discover where. I really don't want to re-install.

I've tried various configurations in BIOS with no luck.

I'm stumped. All suggestions welcome.
TIA,
MiKe




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



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread John Baldwin


On 14-Mar-01 Greg Black wrote:
> "David O'Brien" writes:
> 
>| On Wed, Mar 14, 2001 at 12:27:02PM +1000, Greg Black wrote:
>| > This is the point where we disagree.  The information in this
>| > file is in fact of interest to somebody who does a fresh install
>| > from CD as the simple way to upgrade from an earlier release.
>| 
>| Huh???  If you do a fresh install from CD, you will get a
>| sendmail+sendmail.cf+mail.local that are all in sync and setup properly.
> 
> I'm sure that's true; my point was that you don't get the useful
> information that you pointed out in "/usr/src/UPDATING", since
> that file only gets installed in some situations.  I'm trying to
> make a case for that file (or the information it contains) to be
> part of every fresh install.

Er, and how does that help someone who cvsups a newer part of the tree and
doesn't get the newer UPDATING?  :)  UPDATING only makes sense within the
context it lives in right now.  If you install sbase (or maybe ssrc, whatever
the "base source" dist is) you should get this file during sysinstall with the
version applicable to that release.  I think what you want is probably that
some of the info in src/UPDATING be duplicated in the release notes, which is
where the info you are referring to really belongs.

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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



Re: ecc kld for FreeBSD 4.2

2001-03-13 Thread Chris Sears


Chris

THANKS! and compliments on your name.  It was a quick and simple port
to see if people were interested. I've sent it to the author/maintainer
Dan Hollis but I haven't gotten a response yet.  He has an email list
on Yahoo/Groups and there is occasional traffic so it isn't dead code.

Yes, I did notice that there was no licensing.  I will broach that with him.
I can live with GPL since I see this as being a KLD which can be installed
from source.  But I prefer BSD.

DEV_MODULE vs DRIVER_MODULE.  It is true that DEV_MODULE is much less common
but it is minimally sufficient.  If it were a DRIVER_MODULE, then it would
just be allocating a bunch of structures and entry points and noop'ing
them out.  But perhaps someone else could lend an opinion.

Thanks for the 440BX patch, I'll add it.  As far as the ServerWorks III chipset,
the necessary documentation has *not* been available.  I think they are
a small company and a little paranoid WRT intellectual property.
If you have it, or if you can get it, this would be great.

Basically, I would like to break the file into Linux, BSD and ecc sections.
This would simplify things for the author who has expressed interest in
a kernel patch as well as a module.  The reason for kernel was that module
support can be config'd out on Linux.

I'm not sure how kld's are distributed as there don't seem to be any in
the ports collection.  And I wouldn't mind cleaning it up a bit.

Chris

BTW, attached is the Makefile I used.

BINDIR  = /tmp
SRCS= ecc.c device_if.h bus_if.h pci_if.h
KMOD= ecc
NOMAN   = t
KLDMOD  = t

KLDLOAD = /sbin/kldload
KLDUNLOAD   = /sbin/kldunload

CLEANFILES+= ${KMOD}

load: ${KMOD}.ko
${KLDLOAD} -v ./${KMOD}.ko

unload:
${KLDUNLOAD} -v -n ${KMOD}

.include 



Re: Solution: Sendmail 8.11.3 on FreeBSD 4.2

2001-03-13 Thread Greg Black

John Baldwin writes:
| On 14-Mar-01 Greg Black wrote:
| > "David O'Brien" writes:
| >| On Wed, Mar 14, 2001 at 12:27:02PM +1000, Greg Black wrote:
| >| > This is the point where we disagree.  The information in this
| >| > file is in fact of interest to somebody who does a fresh install
| >| > from CD as the simple way to upgrade from an earlier release.
| >| 
| >| Huh???  If you do a fresh install from CD, you will get a
| >| sendmail+sendmail.cf+mail.local that are all in sync and setup properly.
| > 
| > I'm sure that's true; my point was that you don't get the useful
| > information that you pointed out in "/usr/src/UPDATING", since
| > that file only gets installed in some situations.  I'm trying to
| > make a case for that file (or the information it contains) to be
| > part of every fresh install.
| 
| Er, and how does that help someone who cvsups a newer part of the tree and
| doesn't get the newer UPDATING?  :)

Sorry, I don't understand the question.  I don't use cvsup and
have no plans to, so maybe I am missing something, but I don't
see why cvsup would not give you the right version of a file.

| UPDATING only makes sense within the
| context it lives in right now.  If you install sbase (or maybe ssrc, whatever
| the "base source" dist is) you should get this file during sysinstall with the
| version applicable to that release.  I think what you want is probably that
| some of the info in src/UPDATING be duplicated in the release notes, which is
| where the info you are referring to really belongs.

So you agree with me, the way I read this.

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



Re: ecc kld for FreeBSD 4.2

2001-03-13 Thread Mike Smith

> THANKS! and compliments on your name.  It was a quick and simple port
> to see if people were interested. I've sent it to the author/maintainer
> Dan Hollis but I haven't gotten a response yet.  He has an email list
> on Yahoo/Groups and there is occasional traffic so it isn't dead code.
> 
> Yes, I did notice that there was no licensing.  I will broach that with him.
> I can live with GPL since I see this as being a KLD which can be installed
> from source.  But I prefer BSD.
> 
> DEV_MODULE vs DRIVER_MODULE.  It is true that DEV_MODULE is much less common
> but it is minimally sufficient.  If it were a DRIVER_MODULE, then it would
> just be allocating a bunch of structures and entry points and noop'ing
> them out.  But perhaps someone else could lend an opinion.

I'm fixing this so that it doesn't use the 2.x PCI compatibility 
interface; there's a lot of other real ugliness in here, some of which is 
probably worth throwing out.

The lack of an NMI handler is actually really poor, but fortunately, easy 
to deal with.

There's a decision to be made here with regards to this code.

If it's OK to relicense it under the BSDL, it should be integrated with 
the i386 hostbridge code (ie. not a KLD at all).  If we do that, tracking 
the Linux module is going to be a little bit more work (but not a lot).

If it's not OK, then it'll need to be maintained separately (or 
rewritten, which wouldn't be too hard).

At any rate, I'll contact you once I've fixed the attachment code; it's 
pretty simple.  You might also want to talk to Paul Saab ([EMAIL PROTECTED]) 
who has ECC code for FreeBSD already, including some NMI support.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E



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