Dell gx280 and acpi problems

2004-09-22 Thread Danny Braniss
could some acpi expert shed some light?

-current panics on boot with BIOS default settings (Suspend Mode is S3)
fix: set Power Management/Suspend Mode to S1 in BIOS

disabling ACPI on boot is not good, since this box has no PS/2, and the USB
keyboard/mouse don't work with ACPI off.

the acpi dumps are available from:
ftp://ftp.cs.huji.ac.il/users/danny/freebsd/gx280

this is the panic:


KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.3-BETA5 #14: Tue Sep 21 13:44:32 IDT 2004
[EMAIL PROTECTED]:/r+d/obj/new-dev/r+d/5.3/src/sys/HUJI
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf34  Stepping = 4
  Features=0xbfebfbff
  Hyperthreading: 2 logical CPUs
real memory  = 1063813120 (1014 MB)
avail memory = 1031565312 (983 MB)
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x1c
fault code  = supervisor write, page not present
instruction pointer = 0x8:0xc075dab5
stack pointer   = 0x10:0xc0c21be0
frame pointer   = 0x10:0xc0c21cac
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 = 0 ()
[thread 0]
Stopped at  vm_fault+0x1b1: lock cmpxchgl   %ecx,0x1c(%edx)
db> trace
vm_fault(c103a000,c1004000,1,0,c08e36c0) at vm_fault+0x1b1
trap_pfault(c0c21d14,0,c1004c29) at trap_pfault+0x184
trap(fffd0018,c110,c0c20010,c1004bfd,7) at trap+0x2f1
calltrap() at calltrap+0x5
--- trap 0xc, eip = 0xc0a18574, esp = 0xc0c21d54, ebp = 0xc0c21d74 ---
madt_probe(c22264f0,c08bb1f0,c0c21d98,c05e8302,0) at madt_probe+0x174
apic_init(0,c1ec00,c1e000,0,c0441225) at apic_init+0x47
mi_startup() at mi_startup+0x96
begin() at begin+0x2c


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


jump from kernel to loader

2004-09-22 Thread vijay singh
hello, i have some exposure to the freebsd code, but not extensive. i am 
reading the sys/boot code, and saw that the 3 stage boot process involves a 
jump from the loader to the kernel in the last phase. i was wondering if it 
is possible to engineer the kernel to jump back to the loader in some 
special cases?

kindly cc me as i am not on the list.
br
vijay
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


execute a user process in the kernel

2004-09-22 Thread Gordon David
Hello,
I have a question. Anyone would like to tell me how to execute a user 
process or shell script in the kernel?

As we know, the kernel forks a process named initproc and executes 
/sbin/init, etc. If I want to execute a user level process, such as a 
simple printf("Hello world") in a driver, what shall I do?

Thanks
Gordon
_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

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


Re: jump from kernel to loader

2004-09-22 Thread Ryan Sommers

vijay singh said:
> hello, i have some exposure to the freebsd code, but not extensive. i am
> reading the sys/boot code, and saw that the 3 stage boot process involves
> a
> jump from the loader to the kernel in the last phase. i was wondering if
> it
> is possible to engineer the kernel to jump back to the loader in some
> special cases?
>
> kindly cc me as i am not on the list.
>
> br
> vijay
>

It is my understanding that after jumping to the kernel the kernel assumes
control of all of memory, including where the loader is currently loaded.
In that case it would be impossible to jump back to the loader without
first being sure to reload it into memory.

I could be wrong on this however.

-- 
Ryan Sommers
[EMAIL PROTECTED]


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


RE: slow login, app launching, etc

2004-09-22 Thread Bagus
Thanks Tony!

I'd been moving and offline for a while, but coming back to this email
inspired me to look at my resolve.conf one more time and try using names
instead of ip numbers. Upon reboot, everything is lickedy split fast.

y'all can check out my ancient java server now up at
http://www.bagus.org/

It's kind of a content management tool. Sign the guestbook! It's under
Community. There's some stuff about me up at
http://www.bagus.org/people/bagus/

Long live 2.2CAM-19980716-SNAP!

Bagus

> -Original Message-
> From: Tony Frank [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 03, 2004 7:41 PM
> To: Bagus
> Cc: [EMAIL PROTECTED]
> Subject: Re: slow login, app launching, etc
>
>
> Hi there,
>
> On Wed, Sep 01, 2004 at 08:25:20AM -0500, Bagus wrote:
> >
> >  Hi, is anyone able to help me problem solve on this? Is this the right
> > forum for this kind of question? If not, could someone please send me a
> > pointer to an organization that might be able to help. I have a
> small budget
> > to get this fixed if anyone wants it.
> >
> >  I'm running FreeBSD 2.2CAM-19980716-SNAP on bagus.org.
> >
> >  I've been running it for a few years. Recently, after normal
> performance,
> >  I've been experiencing extremely slow login prompt appearance,
> extremely
> >  slow application launching and what bugs me the most is the
> extremely slow
> >  response time of my java-web server. OTher functionality is
> ok. It serves
> >  html files just fine and also basic command line response is fine.
> >
> >  Anyone out there have any clues as to what it could be? I'm kind
> >  of guessing  it has something to do with some name resolution
> somewhere,
> >  but I'm not sure. Any help would be greatly appreciated.
>
> Try checking your DNS setup; it may have changed?
>
> I often see this kind of behaviour when the host tries to perform
> reverse lookup on IP addresses.
> If DNS is configured incorrectly (eg non existant DNS server) the query
> times out (takes maybe 75s for default bind resolver) instead of returning
> an error or whatever.
>
> /etc/resolv.conf and /etc/hosts are good places to start.
>
> Regards,
>
> Tony

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


Re: gdb attach on 5.3-beta5?

2004-09-22 Thread Mike Hunter
On Sep 21, "Ryan Sommers" wrote:

[snip gdb attach stuff]

> Short answer, you still need to supply GDB with the executable name. do
> 'gdb -p  /path/to/executable'.
> 
> Long answer: http://00f.net/blogs/index.php/2004/09/11/p98
> 
> Hope this helps!

Thanks!  With the correct syntax, I am now able to completely lock up my
box :|

If I get motivated enough to do serial console kernel debugging I'll write
back.

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


Some questions about jails

2004-09-22 Thread Matteo Riondato
Hello hackers!

I've a few questions about jail(8) and hope you'll be so kind to answer
them =)

First of all: Why is procfs(5) required inside a jail (speaking about
5.x and 6) ? "
As procfs is considered deprecated due to its inherent security
risks",why should it be used inside a jail?

Second question: why does an "ifconfig" from inside a jail list every
network card present in the host system? Wouldn't it be better if only
lo0 and the interface with the jail IP are listed ? I think it will,
because it's my personal opinion (please refute me, I can be wrong) that
one jail's purpouses is to fool the jail users, making them believe that
they are inside a real system. I came to this conclusion reading about
security.jail.getfstatroot_only in jail(8).

Thank you in advance for your replies.
Best Regards
-- 
Rionda aka Matteo Riondato
GUFI Staff Member (http://www.gufi.org)
FreeSBIE Developer (http://www.freesbie.org)
BSD-FAQ-it Main Developer (http://www.gufi.org/~rionda)
Sent from: kaiser.sig11.org running FreeBSD-6.0-CURRENT


signature.asc
Description: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata


Re: Some questions about jails

2004-09-22 Thread Claudiu Dragalina-Paraipan
Hi,
Matteo Riondato wrote:
Hello hackers!
I've a few questions about jail(8) and hope you'll be so kind to answer
them =)
First of all: Why is procfs(5) required inside a jail (speaking about
5.x and 6) ? "
As procfs is considered deprecated due to its inherent security
risks",why should it be used inside a jail?
Maybe some software might not work without it, so it is a good thing to
have it around. You don't need to start a jail with procfs, it is your
decision.
Second question: why does an "ifconfig" from inside a jail list every
network card present in the host system? Wouldn't it be better if only
lo0 and the interface with the jail IP are listed ? I think it will,
because it's my personal opinion (please refute me, I can be wrong) that
one jail's purpouses is to fool the jail users, making them believe that
they are inside a real system. I came to this conclusion reading about
security.jail.getfstatroot_only in jail(8).
In general, I don't think it is about fooling the jail user. It is about
isolating the user or the attacker that manages to get into the jail.
I think this is why the jail was initialy created.
Also, you might find this link interesting:
http://kerneltrap.org/node/view/3075

Thank you in advance for your replies.
Best Regards
With respect,
--
Claudiu Dragalina-Paraipan
e-mail: [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


freebsd kernel buffer overflow patch

2004-09-22 Thread gerarra
Hi,
I've seen a potential problem in my patch; SYF_MPSAFE flag for MP safe syscalls
is not managed; maybe something like that is better:

===
kern/kern_syscalls.c:

--- kern_syscalls.c Sat Sep 18 13:42:21 2004
+++ kern_syscalls2.cWed Sep 22 20:25:22 2004
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 

 /*
  * Acts like "nosys" but can be identified in sysent for dynamic call
@@ -58,6 +59,17 @@
 syscall_register(int *offset, struct sysent *new_sysent,
 struct sysent *old_sysent)
 {
+#ifdef MAX_SYSCALL_ARGS
+   if ((new_sysent->sy_narg & ~SYF_MPSAFE) < 0 ||
+   (new_sysent->sy_narg & ~SYF_MPSAFE) > MAX_SYSCALL_ARGS)
+   {
+   printf("Invalid sy_narg for syscall: boundary is [0 - %d]\n",
+   MAX_SYSCALL_ARGS);
+   return EINVAL;
+   }
+#endif
+
+
if (*offset == NO_SYSCALL) {
int i;

complete diffs tree to http://www.gufi.org/~rookie/args-diff.tar.gz

rookie


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


Re: Dell gx280 and acpi problems

2004-09-22 Thread John Baldwin
On Wednesday 22 September 2004 04:58 am, Danny Braniss wrote:
> could some acpi expert shed some light?
>
> -current panics on boot with BIOS default settings (Suspend Mode is S3)
> fix: set Power Management/Suspend Mode to S1 in BIOS
>
> disabling ACPI on boot is not good, since this box has no PS/2, and the USB
> keyboard/mouse don't work with ACPI off.
>
> the acpi dumps are available from:
>   ftp://ftp.cs.huji.ac.il/users/danny/freebsd/gx280
>
> this is the panic:
>
>
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> Copyright (c) 1992-2004 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> The Regents of the University of California. All rights reserved.
> FreeBSD 5.3-BETA5 #14: Tue Sep 21 13:44:32 IDT 2004
> [EMAIL PROTECTED]:/r+d/obj/new-dev/r+d/5.3/src/sys/HUJI
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU)
>   Origin = "GenuineIntel"  Id = 0xf34  Stepping = 4
>  
> Features=0xbfebfbffA, CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>   Hyperthreading: 2 logical CPUs
> real memory  = 1063813120 (1014 MB)
> avail memory = 1031565312 (983 MB)
> kernel trap 12 with interrupts disabled
>
>
> Fatal trap 12: page fault while in kernel mode
> cpuid = 0; apic id = 00
> fault virtual address   = 0x1c
> fault code  = supervisor write, page not present
> instruction pointer = 0x8:0xc075dab5
> stack pointer   = 0x10:0xc0c21be0
> frame pointer   = 0x10:0xc0c21cac
> 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 = 0 ()
> [thread 0]
> Stopped at  vm_fault+0x1b1: lock cmpxchgl   %ecx,0x1c(%edx)
> db> trace
> vm_fault(c103a000,c1004000,1,0,c08e36c0) at vm_fault+0x1b1
> trap_pfault(c0c21d14,0,c1004c29) at trap_pfault+0x184
> trap(fffd0018,c110,c0c20010,c1004bfd,7) at trap+0x2f1
> calltrap() at calltrap+0x5
> --- trap 0xc, eip = 0xc0a18574, esp = 0xc0c21d54, ebp = 0xc0c21d74 ---
> madt_probe(c22264f0,c08bb1f0,c0c21d98,c05e8302,0) at madt_probe+0x174
> apic_init(0,c1ec00,c1e000,0,c0441225) at apic_init+0x47
> mi_startup() at mi_startup+0x96
> begin() at begin+0x2c

Can you do a 'gdb kernel.debug' and then do 'l madt_probe+0x174' and e-mail 
the results?

-- 
John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: execute a user process in the kernel

2004-09-22 Thread Allan Fields
On Wed, Sep 22, 2004 at 08:49:11AM +, Gordon David wrote:
> Hello,
> 
> I have a question. Anyone would like to tell me how to execute a user 
> process or shell script in the kernel?

You probably really don't want to do this and if you do, there is
likely a better approach.

> As we know, the kernel forks a process named initproc and executes 
> /sbin/init, etc. If I want to execute a user level process, such as a 
> simple printf("Hello world") in a driver

Why?

> what shall I do?

Lots of good references on distinctions between kernel and userland.

Try:

The Design and Implementation of 4.4BSD (First few chapters)
file:///usr/share/doc/en/books/design-44bsd/

> Thanks
> Gordon

--
 Allan Fields, AFRSL - http://afields.ca
 2D4F 6806 D307 0889 6125  C31D F745 0D72 39B4 5541
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Global (non _KERNEL) place for sockaddr_union?

2004-09-22 Thread Max Laier
On Monday 20 September 2004 02:50, Max Laier wrote:
> Hi,
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/71836 is the symptom. Now I
> am looking for a clean solution to it. What is needed is an include file
> that defines union sockaddr_union in a way that is useable from kernel and
> userland. Historically it seems that this union first apeared in context of
> ipsec within the kernel. pf has adopted it, but uses it in the userland as
> well. I am sure that it can be usefull in a lot of places that have to deal
> with/store different address formats.
>
> My question now is, what would be a good place to define this? Are there
> any fromal standarts that might define it already? (Couldn't find anything)
> Is there anything else that I must consider?
>
> At some point I though netinet/in.h might be a good place, but that'd
> require inclusion of sys/socket.h, which certainly is not a good solution.
>
> Opinions? Ideas?

As no real solution has come up and we couldn't agree what to do with it 
either, I'll resort to an easy hack: 
 http://people.freebsd.org/~mlaier/sockaddr_union.fix.diff

This will fix the issue and not create new problems. With the small exception 
for userland programs that try to include  before 
 and make use of sockaddr_union. Those programs do not exist, 
however, and have been broken before.

Any objections? [ I know it's ugly already. ]

-- 
/"\  Best regards,  | [EMAIL PROTECTED]
\ /  Max Laier  | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | [EMAIL PROTECTED]
/ \  ASCII Ribbon Campaign  | Against HTML Mail and News


pgpJjfI60djyU.pgp
Description: PGP signature


Survey on Open Source

2004-09-22 Thread Mike Chan
Dear all,

I am conducting a survey on open source software. This is for my academic
coursework and dissertation. It will be great to have your support and
participation in this survey. 

This survey has two separate questionnaires, focusing on the following
areas: 

1) OSS development (Developers or those who contribute in coding or
documentation), and
2) IT/IS costs (CIOs or IT Managers). 

You are free to go for the questionnaire that is appropriate for you.

Below are the links:

1) Brief introduction page: 
   http://web.singnet.com.sg/~mikecck/opensource/Introduction1.htm

2) Questionnaire 1(Open Source Development): 
   http://web.singnet.com.sg/~mikecck/opensource/WebFormA1.htm

3) Questionnaire 2(Open Source and IT/IS Cost): 
   http://web.singnet.com.sg/~mikecck/opensource/WebFormB1.htm 


Thank you for your time.



Mike Chan
Student
Curtin University of Technology

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


Re: execute a user process in the kernel

2004-09-22 Thread Chris Pressey
On Wed, 22 Sep 2004 18:46:49 -0400
Allan Fields <[EMAIL PROTECTED]> wrote:

> On Wed, Sep 22, 2004 at 08:49:11AM +, Gordon David wrote:
> > Hello,
> > 
> > I have a question. Anyone would like to tell me how to execute a
> > user process or shell script in the kernel?
> 
> You probably really don't want to do this and if you do, there is
> likely a better approach.

Reading between the lines and guessing - here's what you can do:

Write a userland program that (1) reads /dev/fooctl, (2) does something
based on what it got from /dev/fooctl, and (3) goes back to step (1).

Then write a kernel driver that produces output on /dev/fooctl every
time it wants the userland program to do something.

This achieves the effect you (probably) want while maintaining the
seperation between kernel and userland.

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


Re: Global (non _KERNEL) place for sockaddr_union?

2004-09-22 Thread Bruce M Simpson
Greetings earthmen,

On Thu, Sep 23, 2004 at 02:14:00AM +0200, Max Laier wrote:
> As no real solution has come up and we couldn't agree what to do with it 
> either, I'll resort to an easy hack: 
>  http://people.freebsd.org/~mlaier/sockaddr_union.fix.diff
...
> Any objections? [ I know it's ugly already. ]

Looks fine to me; I agree that this workaround is not ideal but it is
acceptable given the circumstances.

Regards,
BMS


pgp6f5B4E5OKz.pgp
Description: PGP signature