Re: amdtemp need help with testing

2013-10-09 Thread Willem Jan Withagen

On 2013-10-09 13:34, Willem Jan Withagen wrote:

On 2013-10-07 3:24, rozhuk...@gmail.com wrote:

I updated amdtemp and now I need your help with testing.

Now the driver should support all AMD processors.
For a family of 15h and 16h, not all sensors are available - for my
system
does not find drivers for ati SMBus, and other systems based on the AMD I
have not.


CPU: AMD Phenom(tm) II X6 1075T Processor (3013.83-MHz K8-class CPU)
   Origin = "AuthenticAMD"  Id = 0x100fa0  Family = 0x10  Model = 0xa
Stepping = 0
Features=0x178bfbff

   Features2=0x802009
   AMD
Features=0xee500800
   AMD
Features2=0x37ff

   TSC: P-state invariant, performance statistics
L1 2MB data TLB: 48 entries, fully associative
L1 2MB instruction TLB: 16 entries, fully associative
L1 4KB data TLB: 48 entries, fully associative
L1 4KB instruction TLB: 32 entries, fully associative
L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way
associative
L2 2MB data TLB: 128 entries, 2-way associative
L2 2MB instruction TLB: 0 entries, 2-way associative

This is what I get with the 10.0-ALPHA4 driver.

sysctl -a | grep amd
machine amd64
hw.machine: amd64
hw.machine_arch: amd64
hw.snd.version: 2009061500/amd64
hw.mca.amd10h_L1TP: 1
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.sensor_offset: 0
dev.amdtemp.0.core0.sensor0: 58.0C

After bruteforce fixing the compile error by deleting the #ifdef around 
the definition...


--WjW

freetest# sysctl -a | grep amd
machine amd64
"Giant","amdtemp"
hw.machine: amd64
hw.machine_arch: amd64
hw.snd.version: 2009061500/amd64
hw.mca.amd10h_L1TP: 1
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.rtc.CurTmp: 36.6C
dev.amdtemp.0.rtc.CurTmpTjSel: -12.5C
dev.amdtemp.0.rtc.TmpSlewDnEn: 1
dev.amdtemp.0.rtc.TmpMaxDiffUp: 3
dev.amdtemp.0.rtc.PerStepTimeDn: 15
dev.amdtemp.0.rtc.PerStepTimeUp: 15
dev.amdtemp.0.rtc.sensor_offset: 0
dev.amdtemp.0.tsi.sensor0.cpu_temperature: 36.6C
dev.amdtemp.0.tsi.sensor0.high_temperature_threshold: 70.0C
dev.amdtemp.0.tsi.sensor0.low_temperature_threshold: 0.0C
dev.amdtemp.0.tsi.sensor0.cpu_temperature_offset_hi: 0
dev.amdtemp.0.tsi.sensor0.cpu_temperature_offset_lo: 0
dev.amdtemp.0.tsi.sensor0.status: 0
dev.amdtemp.0.tsi.sensor0.cfg3: 0
dev.amdtemp.0.tsi.sensor0.cfg9: 0
dev.amdtemp.0.tsi.sensor0.upd_rate: 8
dev.amdtemp.0.tsi.sensor0.timeout_cfg: 128
dev.amdtemp.0.tsi.sensor0.alert_threshold: 0
dev.amdtemp.0.tsi.sensor0.alert_cfg: 0
dev.amdtemp.0.tsi.sensor0.manufacture_id: 0
dev.amdtemp.0.tsi.sensor0.revision: 1
dev.amdtemp.0.tsi.sensor0.sensor_offset: 0
dev.amdtemp.0.tsi.sensor1.cpu_temperature: 36.6C
dev.amdtemp.0.tsi.sensor1.high_temperature_threshold: 70.0C
dev.amdtemp.0.tsi.sensor1.low_temperature_threshold: 0.0C
dev.amdtemp.0.tsi.sensor1.cpu_temperature_offset_hi: 0
dev.amdtemp.0.tsi.sensor1.cpu_temperature_offset_lo: 0
dev.amdtemp.0.tsi.sensor1.status: 0
dev.amdtemp.0.tsi.sensor1.cfg3: 0
dev.amdtemp.0.tsi.sensor1.cfg9: 0
dev.amdtemp.0.tsi.sensor1.upd_rate: 8
dev.amdtemp.0.tsi.sensor1.timeout_cfg: 128
dev.amdtemp.0.tsi.sensor1.alert_threshold: 0
dev.amdtemp.0.tsi.sensor1.alert_cfg: 0
dev.amdtemp.0.tsi.sensor1.manufacture_id: 0
dev.amdtemp.0.tsi.sensor1.revision: 1
dev.amdtemp.0.tsi.sensor1.sensor_offset: 0
dev.amdtemp.0.tsi.sensor2.cpu_temperature: 36.6C
dev.amdtemp.0.tsi.sensor2.high_temperature_threshold: 70.0C
dev.amdtemp.0.tsi.sensor2.low_temperature_threshold: 0.0C
dev.amdtemp.0.tsi.sensor2.cpu_temperature_offset_hi: 0
dev.amdtemp.0.tsi.sensor2.cpu_temperature_offset_lo: 0
dev.amdtemp.0.tsi.sensor2.status: 0
dev.amdtemp.0.tsi.sensor2.cfg3: 0
dev.amdtemp.0.tsi.sensor2.cfg9: 0
dev.amdtemp.0.tsi.sensor2.upd_rate: 8
dev.amdtemp.0.tsi.sensor2.timeout_cfg: 128
dev.amdtemp.0.tsi.sensor2.alert_threshold: 0
dev.amdtemp.0.tsi.sensor2.alert_cfg: 0
dev.amdtemp.0.tsi.sensor2.manufacture_id: 0
dev.amdtemp.0.tsi.sensor2.revision: 1
dev.amdtemp.0.tsi.sensor2.sensor_offset: 0
dev.amdtemp.0.tsi.sensor3.cpu_temperature: 36.6C
dev.amdtemp.0.tsi.sensor3.high_temperature_threshold: 70.0C
dev.amdtemp.0.tsi.sensor3.low_temperature_threshold: 0.0C
dev.amdtemp.0.tsi.sensor3.cpu_temperature_offset_hi: 0
dev.amdtemp.0.tsi.sensor3.cpu_temperature_offset_lo: 0
dev.amdtemp.0.tsi.sensor3.status: 0
dev.amdtemp.0.tsi.sensor3.cfg3: 0
dev.amdtemp.0.tsi.sensor3.cfg9: 0
dev.amdtemp.0.tsi.sensor3.upd_rate: 8
dev.amdtemp.0.tsi.sensor3.timeout_cfg: 128
dev.amdtemp.0.tsi.sensor3.alert_threshold: 0
dev.amdtemp.0.tsi.sensor3.alert_cfg: 0
dev.amdtemp.0.tsi.sensor3.manufacture_id: 0
dev.amdtemp.0.tsi.sensor3.revision: 1
dev.amdtemp.0.tsi.sensor3.sensor_offset: 0
dev.amdtemp.0.tsi.sensor4.cpu_temperature: 36.6C
dev.amdtemp.0.tsi.sensor4.high_temperature_threshold: 70.0C
dev.amdtemp.0.tsi.sensor4.low_temperature_threshold: 0.0C
dev.amdtemp.0.tsi.sensor4.cpu_temperature_offset_hi: 

Re: amdtemp need help with testing

2013-10-09 Thread Willem Jan Withagen

On 2013-10-07 3:24, rozhuk...@gmail.com wrote:

I updated amdtemp and now I need your help with testing.

Now the driver should support all AMD processors.
For a family of 15h and 16h, not all sensors are available - for my system
does not find drivers for ati SMBus, and other systems based on the AMD I
have not.


CPU: AMD Phenom(tm) II X6 1075T Processor (3013.83-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100fa0  Family = 0x10  Model = 0xa 
Stepping = 0

Features=0x178bfbff
  Features2=0x802009
  AMD 
Features=0xee500800
  AMD 
Features2=0x37ff

  TSC: P-state invariant, performance statistics
L1 2MB data TLB: 48 entries, fully associative
L1 2MB instruction TLB: 16 entries, fully associative
L1 4KB data TLB: 48 entries, fully associative
L1 4KB instruction TLB: 32 entries, fully associative
L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way 
associative

L2 2MB data TLB: 128 entries, 2-way associative
L2 2MB instruction TLB: 0 entries, 2-way associative

This is what I get with the 10.0-ALPHA4 driver.

sysctl -a | grep amd
machine amd64
hw.machine: amd64
hw.machine_arch: amd64
hw.snd.version: 2009061500/amd64
hw.mca.amd10h_L1TP: 1
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.sensor_offset: 0
dev.amdtemp.0.core0.sensor0: 58.0C

This is what I get when I try to compile the new module:
freetest# cd /usr/src/sys/modules/amdtemp/
freetest# make
Warning: Object directory not changed from original 
/usr/src/sys/modules/amdtemp
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE 
-nostdinc   -I. -I@ -I@/contrib/altq -fno-common 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -mno-aes -mno-avx 
-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-error-tautological-compare 
-Wno-error-empty-body  -Wno-error-parentheses-equality  -c 
/usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c
/usr/src/sys/modules/amdtemp/../../dev/amdtemp/amdtemp.c:453:9: error: 
implicit declaration of function 'pci_cfgregread' is invalid in

  C99 [-Werror,-Wimplicit-function-declaration]
if ((pci_cfgregread(pci_get_bus(dev), 
pci_get_slot(dev), 2,

 ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /usr/src/sys/modules/amdtemp

FreeBSD freetest.digiware.nl 10.0-ALPHA4 FreeBSD 10.0-ALPHA4 #1 r256062: 
Tue Oct  8 11:05:54 CEST 2013 
r...@freetest.digiware.nl:/usr/obj/usr/src/sys/FREETEST  amd64


--WjW



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


amdtemp need help with testing

2013-10-06 Thread rozhuk . im
I updated amdtemp and now I need your help with testing.

Now the driver should support all AMD processors.
For a family of 15h and 16h, not all sensors are available - for my system
does not find drivers for ati SMBus, and other systems based on the AMD I
have not.


/*-
 * Copyright (c) 2008, 2009 Rui Paulo 
 * Copyright (c) 2009 Norikatsu Shigemura 
 * Copyright (c) 2009-2011 Jung-uk Kim 
 * Copyright (c) 2013 Rozhuk Ivan 
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in the
 *documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Driver for the AMD CPU on-die thermal sensors.
 * Initially based on the k8temp Linux driver.
 */

#include 
__FBSDID("$FreeBSD$");

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 

#include 

#if defined(__FreeBSD_version) && (__FreeBSD_version < 99)
/* XXX */
extern uint32_t pci_cfgregread(int, int, int, int, int);
#endif


struct amdtemp_softc {
device_tdev;
struct mtx  lock; /* Read/write lock for some registers. */
uint32_tcpu_ncores;
uint32_tflags;
uint32_ttts_flags; /* Thermaltrip Status flags. */
int32_t tts_temp_offset[4];
int32_t rtc_temp_offset;
int32_t tsi_temp_offset[8];
struct sysctl_oid   *sysctl_cpu[MAXCPU]; /* dev.cpu.X.temperature 
oids. */
struct intr_config_hook sc_ich;
};
#define AMDTEMP_F_TTS   1   /* Thermaltrip Status. */
#define AMDTEMP_F_RTC   2   /* Reported Temperature Control. */
#define AMDTEMP_F_TSI   4   /* TSI via CPU registers. */
#define AMDTEMP_F_SBTSI 8   /* TSI via SMBus. */

#define AMDTEMP_TTS_F_CS_SWAP   0x01/* ThermSenseCoreSel is inverted. */
#define AMDTEMP_TTS_F_CT_10BIT  0x02/* CurTmp is 10-bit wide. */
#define AMDTEMP_TTS_F_OFF28 0x04/* CurTmp starts at -28C. */


#define AMDTEMP_LOCK(sc)mtx_lock(&(sc)->lock)
#define AMDTEMP_UNLOCK(sc)  mtx_unlock(&(sc)->lock)


/* CPU Family/Model Register */
#define AMD_REG_CPUID   0xfc

/* 
 * Thermaltrip Status Register
 * BIOS and Kernel Developer’s Guide for AMD NPT Family 0Fh Processors
 * 32559 Rev. 3.16 November 2009
 */
/* D18F3xE4 Thermtrip Status Register */
#define AMD_REG_THERMTRIP_STAT  0xe4
union reg_amd_thermtrip_status_desc {
uint32_t u32;
struct reg_amd_thermtrip_status_bits {
uint32_t r0:1;  /* 0 Reserved. */
uint32_t Thermtp:1; /* 1 ro The processor has entered the 
THERMTRIP state. */
uint32_t ThermSenseCoreSel:1; /* 2 rw  */
uint32_t ThermtpSense0:1; /* 3 ro  */
uint32_t ThermtpSense1:1; /* 4 ro  */
uint32_t ThermtpEn:1;   /* 5 ro The THERMTRIP state is 
supported by the processor. */
uint32_t ThermSenseSel:1; /* 6 rw  */
uint32_t r1:1;  /* 7 Reserved. */
uint32_t DiodeOffset:6; /* 13:8 ro Thermal diode offset is used 
to correct the measurement made by an external temperature sensor. */
uint32_t CurTmp:10; /* 23:14 ro This field returns the 
current value of the internal thermal sensor. */
uint32_t TjOffset:5;/* 28:24 ro This field is the offset 
from CurTmp used to normalize to Tcontrol. */
uint32_t r2:2;  /* 30:29 Reserved. */
uint32_t SwThermtp:1;   /* 31 rw  */
} __packed bits;
};


/* DRAM Configuration High Register */
#define AMD_REG_DRAM_CONF_HIGH  0x94/* Function 2 */
#define AMD_REG_DRAM_MODE_DDR3  0x0100

/* D18F3xA4 Reported Temperature Control R

Need Help: build the kernel with -Os

2012-06-12 Thread rozhuk . im
Hi, All!

I've fixed many warnings: "warning: 'XXX' may be used uninitialized in this
function"
PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=168979

But there are still warning: "- param large-function-growth limit reached
[-Winline]" and sometimes the compiler just crashes with errors:
{standard input}: Assembler messages:
{standard input}: 388636: Warning: end of file not at end of a line; newline
inserted
cc: Internal error: Killed: 9 (program cc1)
Please submit a full bug report.
See http://gcc.gnu.org/bugs.html> for instructions.
*** Error code 1

Please help!



PS: generic, amd64; custom, amd64; custom, arm.



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [NEED HELP]Participate FreeBSD 2012 Gsoc ideas CPU online/offline project

2012-03-19 Thread gnehzuil
On 03/20/2012 09:52 AM, Dong Zhu wrote:

> Hi,
>I am student from China.I am looking forward to joining the Gsoc 2012 and 
> I am very very interested in this idea [1].
> 
>I am a intern working as a Linux kernel-qe,and I am very interested in 
> Timer/Power-Management,so I really want to join this project.But I do not 
> know how to start,How can I join this project ? Could you
>please give me some suggestions ?
> 
> 
>Many Many thanks!
> 
>[1] 
> http://wiki.freebsd.org/IdeasPage#CPU_online.2BAC8-offline_project_.28GSoC.29
> 
> 


Hi Dong,

If you want to join GSoc 2012, please see the documentation in GSoC
(http://www.google-melange.com/gsoc/homepage/google/gsoc2012).  I
remember that you should register firstly and sign up.  Then you will
see the docs about how to submit your proposal that describes your
schedules and goals.

Sorry, I am not familiar with Timer/Power-management.  So I don't have
any suggestions about this project for you.  But, IMO, at least you
should have some basic knowledge about Timer/Power-management and FreeBSD.

Good luck.

Regards,
Zheng
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


[NEED HELP]Participate FreeBSD 2012 Gsoc ideas CPU online/offline project

2012-03-19 Thread Dong Zhu
Hi,
   I am student from China.I am looking forward to joining the Gsoc 2012 and I 
am very very interested in this idea [1].

   I am a intern working as a Linux kernel-qe,and I am very interested in 
Timer/Power-Management,so I really want to join this project.But I do not know 
how to start,How can I join this project ? Could you
   please give me some suggestions ?


   Many Many thanks!

   [1] 
http://wiki.freebsd.org/IdeasPage#CPU_online.2BAC8-offline_project_.28GSoC.29


-- 
Best Regards,
Dong Zhu

WebSite: http://bluezd.info

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Re: Need help trying to to use the ntohl() call with in_addr

2009-08-14 Thread bertwiley

Thanks guys
On Aug 14, 2009 4:11am, "Bjoern A. Zeeb"   
wrote:

On Fri, 14 Aug 2009, Max Laier wrote:









On Friday 14 August 2009 05:29:19 bert wiley wrote:






Hi everyone







Im new to list and this question may be out of place. This is my first




post. Im new to freebsd and trying to understand how to create a jail from




some system calls. I followed the jail subsystem description from the




handbook and im having a problem or may be using the call incorrectly. But




here is what im trying to do.










int main()




{




struct in_addr ipaddr;




struct jail myjail;







char path[PATH_MAX];







realpath("/tmp", path);







myjail.version = 1;




myjail.path = path;




myjail.hostname = "testjail";







const char *ip;




ip = "192.168.1.142";







inet_aton(ip, &ipaddr);




myjail.ip4 = ntohl(ipaddr.s_addr); // I get and error here, invalid




conversion from _uint32_t' to in_addr*




myjail.ip4 = ipaddr.s_addr; // and and error here, invlid




conversion from in_addr_t to in_addr*




}










I know that there is more that needs to be done but this just a test stub




as im trying to work thru the calls and understand whats going on.




Any would be appreciated thanks.









Take a look at the jail(2) man page:







The ``ip4s'' and ``ip6s'' give the numbers of IPv4 and IPv6 addresses




that will be passed via their respective pointers.







The ``ip4'' and ``ip6'' pointers can be set to an arrays of IPv4 and IPv6




addresses to be assigned to the prison, or NULL if none. IPv4 addresses




must be in network byte order.







So you'd do something like the following:







myjail.ip4s = 1;




inet_aton(ip, &ipaddr);




myjail.ip4 = &ipaddr;







You don't have to switch byte order.









and in that case of 7.2-R or later multi-IP jails the version should




not be 1 either.







I fixed tools/regressions/priv the other day; maybe this helps a bit




as well:




http://svn.freebsd.org/viewvc/base/head/tools/regression/priv/main.c?r1=173679&r2=196172







/bz







--




Bjoern A. Zeeb What was I talking about and who are you again?




___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Need help trying to to use the ntohl() call with in_addr

2009-08-14 Thread Bjoern A. Zeeb

On Fri, 14 Aug 2009, Max Laier wrote:


On Friday 14 August 2009 05:29:19 bert wiley wrote:

Hi everyone

  Im new to list and this question may be out of place. This is my first
post. Im new to freebsd and trying to understand how to create a jail from
some system calls. I followed the jail subsystem description from the
handbook and im having a problem or may be using the call incorrectly. But
here is what im trying to do.


int main()
{
  struct in_addr ipaddr;
  struct jail myjail;

  char path[PATH_MAX];

  realpath("/tmp", path);

  myjail.version = 1;
  myjail.path = path;
  myjail.hostname = "testjail";

  const char *ip;
  ip = "192.168.1.142";

  inet_aton(ip, &ipaddr);
  myjail.ip4 = ntohl(ipaddr.s_addr);   //  I get and error here, invalid
conversion from   _uint32_t' to in_addr*
  myjail.ip4 = ipaddr.s_addr;// and and error here, invlid
conversion from in_addr_t to in_addr*
}


I know that there is more that needs to be done but this just a test stub
as im trying to work thru the calls and understand whats going on.
Any would be appreciated thanks.


Take a look at the jail(2) man page:

The ``ip4s'' and ``ip6s'' give the numbers of IPv4 and IPv6 addresses
that will be passed via their respective pointers.

The ``ip4'' and ``ip6'' pointers can be set to an arrays of IPv4 and IPv6
addresses to be assigned to the prison, or NULL if none.  IPv4 addresses
must be in network byte order.

So you'd do something like the following:

myjail.ip4s = 1;
inet_aton(ip, &ipaddr);
myjail.ip4 = &ipaddr;

You don't have to switch byte order.


and in that case of 7.2-R or later multi-IP jails the version should
not be 1 either.

I fixed tools/regressions/priv the other day; maybe this helps a bit
as well:
http://svn.freebsd.org/viewvc/base/head/tools/regression/priv/main.c?r1=173679&r2=196172

/bz

--
Bjoern A. Zeeb   What was I talking about and who are you again?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Need help trying to to use the ntohl() call with in_addr

2009-08-14 Thread Max Laier
On Friday 14 August 2009 05:29:19 bert wiley wrote:
> Hi everyone
>
>   Im new to list and this question may be out of place. This is my first
> post. Im new to freebsd and trying to understand how to create a jail from
> some system calls. I followed the jail subsystem description from the
> handbook and im having a problem or may be using the call incorrectly. But
> here is what im trying to do.
>
>
> int main()
> {
>   struct in_addr ipaddr;
>   struct jail myjail;
>
>   char path[PATH_MAX];
>
>   realpath("/tmp", path);
>
>   myjail.version = 1;
>   myjail.path = path;
>   myjail.hostname = "testjail";
>
>   const char *ip;
>   ip = "192.168.1.142";
>
>   inet_aton(ip, &ipaddr);
>   myjail.ip4 = ntohl(ipaddr.s_addr);   //  I get and error here, invalid
> conversion from   _uint32_t' to in_addr*
>   myjail.ip4 = ipaddr.s_addr;// and and error here, invlid
> conversion from in_addr_t to in_addr*
> }
>
>
> I know that there is more that needs to be done but this just a test stub
> as im trying to work thru the calls and understand whats going on.
> Any would be appreciated thanks.

Take a look at the jail(2) man page:

 The ``ip4s'' and ``ip6s'' give the numbers of IPv4 and IPv6 addresses
 that will be passed via their respective pointers.

 The ``ip4'' and ``ip6'' pointers can be set to an arrays of IPv4 and IPv6
 addresses to be assigned to the prison, or NULL if none.  IPv4 addresses
 must be in network byte order.

So you'd do something like the following:

myjail.ip4s = 1;
inet_aton(ip, &ipaddr);
myjail.ip4 = &ipaddr;

You don't have to switch byte order.

-- 
/"\  Best regards,  | mla...@freebsd.org
\ /  Max Laier  | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mla...@efnet
/ \  ASCII Ribbon Campaign  | Against HTML Mail and News
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Need help trying to to use the ntohl() call with in_addr

2009-08-13 Thread bert wiley
Hi everyone

  Im new to list and this question may be out of place. This is my first
post. Im new to freebsd and trying to understand how to create a jail from
some system calls. I followed the jail subsystem description from the
handbook and im having a problem or may be using the call incorrectly. But
here is what im trying to do.


int main()
{
  struct in_addr ipaddr;
  struct jail myjail;

  char path[PATH_MAX];

  realpath("/tmp", path);

  myjail.version = 1;
  myjail.path = path;
  myjail.hostname = "testjail";

  const char *ip;
  ip = "192.168.1.142";

  inet_aton(ip, &ipaddr);
  myjail.ip4 = ntohl(ipaddr.s_addr);   //  I get and error here, invalid
conversion from   _uint32_t' to in_addr*
  myjail.ip4 = ipaddr.s_addr;// and and error here, invlid
conversion from in_addr_t to in_addr*
}


I know that there is more that needs to be done but this just a test stub as
im trying to work thru the calls and understand whats going on.
Any would be appreciated thanks.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: need help with vbox

2008-10-16 Thread Jeremy Messenger

On Thu, 16 Oct 2008 05:17:47 -, Desmond Chapman
<[EMAIL PROTECTED]> wrote:



It's dependent upon kbuild. Since the developers have no intention of  
fixing the issue, I would like a tutorial on converting the kmk file to  
a normal Makefile.


I think you are barking at the wrong tree. :-) I don't think the issue is  
in kBuild. It looks like an issue is in devel/kbuild/Makefile in the  
do-install target part.


http://pointyhat.freebsd.org/errorlogs/sparc64-errorlogs/e.6.20080731104323/kBuild-0.1.3.log


	(cd ${WRKSRC}/out/freebsd.${MACHINE_ARCH}/release${PREFIX}/bin &&  
${COPYTREE_BIN} \* ${PREFIX}/bin)




# make -V COPYTREE_BIN
/bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1 >/dev/null  
2>&1) &&  /usr/sbin/chown -R root:wheel $1 &&  /usr/bin/find $1 -type d  
-exec chmod 755 {} \; &&  /usr/bin/find $1 -type f -exec chmod 555 {} \;'  
--



So.. See that $1, it is ${PREFIX}/bin. It's a bug. The COPYTREE_BIN can't  
have ${PREFIX}/bin. I suggest you to not use COPYTREE_BIN, so do the  
different method should solve kbuild ports problem. I personal haven't use  
COPYTREE_* before, so possible misuse COPYTREE_BIN or just can't have  
${PREFIX}/bin (uncheck in bsd.port.mk/document).


BTW: Add CC'ing to freebsd-ports@ to make its search useful.

Cheers,
Mezz


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


Re: need help with vbox

2008-10-16 Thread Ivan Voras
Desmond Chapman wrote:
> Gentleman, I agree with both of you.
> Thanks for everything.

Sorry if it seemed terse - I wasn't trying to discourage you.
Translating from one Makefile type into another is similar to
translating from one programming language to another - you need someone
who knows both languages very well. I don't know how many people know
both kmk and FreeBSD make well enough to help you (for that matter, both
systems have people dedicated to makefiles since they can be very
complex, so the majority of developers don't know the full magic behind
the makefiles).

Since you probably can't use much of the Linux source for your FreeBSD
kernel module (you'll probably have to do most of it from scratch),
you'd do much better to abandon kmk and write your FreeBSD makefiles
with FreeBSD make. You'll have to write new makefiles anyway.

On the other hand (I'm not a makefile expert), browsing through
http://svn.netlabs.org/kbuild/wiki/kmk it looks like most "new" features
are present in FreeBSD's make, though in a different form (and were
probably implemented ages ago so they just went ahead and reinvented the
wheel again). For example:

# Explicit multi-target rules, i.e. explicit make rules that output more
than one file.

make(1): "Dependency lines consist of one or more targets, an operator... "

# Prepend assignment operator

I think you can do this with regular variable expansion.

# The special .NOTPARALLEL goal has been extended...

The .NOTPARALLEL goal exists, but it looks like it's not "extended".
Anyway it doesn't matter.

# It has some extra predefined variables:

You'll have to simulate those with regular variables.

# It has a few new builtin functions...

FreeBSD's make doesn't have many builtin functions but arithmetic
operations work by default (".if $a < 10"). There are no binary
operators. Some string functions are present as operators (like "O -
Order every word in the variable alphabetically"). You can simulate many
functions and operators by invoking shell scripts.

# A bunch of builtin utilities which will be invoked without spawning
new process or shell. Most of these are taken from BSD.  (cp, echo, cat,
append...)

Though it says they came from BSD, I can't find anything about builtin
utilities in make(1). Just use regular shell utilities.




signature.asc
Description: OpenPGP digital signature


RE: need help with vbox

2008-10-16 Thread Desmond Chapman

Gentleman, I agree with both of you.
Thanks for everything.

> To: freebsd-hackers@freebsd.org
> From: [EMAIL PROTECTED]
> Date: Thu, 16 Oct 2008 11:32:48 +0200
> Subject: Re: need help with vbox
> 
> Bruce Cran wrote:
>> Ivan Voras wrote:
>>> Desmond Chapman wrote:
>>>  
>>>> It's dependent upon kbuild. Since the developers have no intention of
>>>> fixing the issue, I would like a tutorial on converting the kmk file
>>>> to a normal Makefile.
>>>> 
>>>
>>> What is kmk? Google only shows it's used with VirtualBox and nowhere
>>> else. If it's something the authors of VirtualBox created, you'll have
>>> to ask them.
>>>   
>> 
>> Apparently it's the tool used to build kbuild
>> (http://svn.netlabs.org/kbuild/wiki/kmk, http://kbuild.sourceforge.net/)
>> projects.   It seems it's what the Linux kernel build system uses.
> 
> Well, this seems to sum it up:
> 
> """
> Why not use vanilla GNU make? There are several reasons:
> ...
> # Finally, because we can. :-)
> """
> 

_
When your life is on the go—take your life with you.
http://clk.atdmt.com/MRT/go/115298558/direct/01/___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: need help with vbox

2008-10-16 Thread Desmond Chapman



> To: freebsd-hackers@freebsd.org
> From: [EMAIL PROTECTED]
> Date: Thu, 16 Oct 2008 11:11:37 +0200
> Subject: Re: need help with vbox
> 
> Desmond Chapman wrote:
>> It's dependent upon kbuild. Since the developers have no intention of fixing 
>> the issue, I would like a tutorial on converting the kmk file to a normal 
>> Makefile.
> 
> What is kmk? Google only shows it's used with VirtualBox and nowhere
> else. If it's something the authors of VirtualBox created, you'll have
> to ask them.
> 

That's the problem. I started maintaining the kBuild port which is also part of 
virtualbox and makes the kmk type files. Since kBuild is marked as broken, and 
for good reason. 
Anyway, thanks for the response. 

_
Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: need help with vbox

2008-10-16 Thread Ivan Voras
Bruce Cran wrote:
> Ivan Voras wrote:
>> Desmond Chapman wrote:
>>  
>>> It's dependent upon kbuild. Since the developers have no intention of
>>> fixing the issue, I would like a tutorial on converting the kmk file
>>> to a normal Makefile.
>>> 
>>
>> What is kmk? Google only shows it's used with VirtualBox and nowhere
>> else. If it's something the authors of VirtualBox created, you'll have
>> to ask them.
>>   
> 
> Apparently it's the tool used to build kbuild
> (http://svn.netlabs.org/kbuild/wiki/kmk, http://kbuild.sourceforge.net/)
> projects.   It seems it's what the Linux kernel build system uses.

Well, this seems to sum it up:

"""
Why not use vanilla GNU make? There are several reasons:
...
# Finally, because we can. :-)
"""



signature.asc
Description: OpenPGP digital signature


Re: need help with vbox

2008-10-16 Thread Bruce Cran

Ivan Voras wrote:

Desmond Chapman wrote:
  

It's dependent upon kbuild. Since the developers have no intention of fixing 
the issue, I would like a tutorial on converting the kmk file to a normal 
Makefile.



What is kmk? Google only shows it's used with VirtualBox and nowhere
else. If it's something the authors of VirtualBox created, you'll have
to ask them.
  


Apparently it's the tool used to build kbuild 
(http://svn.netlabs.org/kbuild/wiki/kmk, http://kbuild.sourceforge.net/) 
projects.   It seems it's what the Linux kernel build system uses.


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


Re: need help with vbox

2008-10-16 Thread Ivan Voras
Desmond Chapman wrote:
> It's dependent upon kbuild. Since the developers have no intention of fixing 
> the issue, I would like a tutorial on converting the kmk file to a normal 
> Makefile.

What is kmk? Google only shows it's used with VirtualBox and nowhere
else. If it's something the authors of VirtualBox created, you'll have
to ask them.



signature.asc
Description: OpenPGP digital signature


need help with vbox

2008-10-15 Thread Desmond Chapman

It's dependent upon kbuild. Since the developers have no intention of fixing 
the issue, I would like a tutorial on converting the kmk file to a normal 
Makefile.
_
See how Windows connects the people, information, and fun that are part of your 
life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Need help debugging Python coredump

2008-07-09 Thread Jeroen Ruigrok van der Werven
I can reproduce the problem on both 6.3 and 7.0-STABLE.

With the current Python 2.6 SVN trunk I have been getting coredumps for a
while now when the curses regression tests get run.

When it coredumps it is always a signal 11.

Steps to reproduce:

1) get Python from trunk: svn checkout
http://svn.python.org/projects/python/trunk python
2) configure: cd python && ./configure --prefix=$HOME/python
3) build: make
4) run: ./python -E -tt Lib/test/regrtest.py -l -ucurses test_curses
   This test will pass, at least it did for me.
5) run: ./python -E -tt Lib/test/regrtest.py -l -uall -rw
   This starts all tests in a random order with verbosity on. Suddenly
   test_curses will coredump.

I get two backtraces:

#0  0x28553c3a in doupdate () from /lib/libncursesw.so.7
#1  0x28854a50 in PyCurses_doupdate (self=0x0)
at /usr/home/asmodai/projects/python/Modules/_cursesmodule.c:1652
#2  0x080d097f in PyEval_EvalFrameEx (f=0x82b66fc, throwflag=0)
at Python/ceval.c:3629
#3  0x080d186a in PyEval_EvalFrameEx (f=0x8c1098c, throwflag=0)
at Python/ceval.c:3731
#4  0x080d186a in PyEval_EvalFrameEx (f=0x93f1c0c, throwflag=0)
at Python/ceval.c:3731
#5  0x080d226a in PyEval_EvalCodeEx (co=0x8a8f3c8, globals=0x8c43e84, 
locals=0x8c43e84, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, closure=0x0) at Python/ceval.c:2908
#6  0x080d23c7 in PyEval_EvalCode (co=0x8a8f3c8, globals=0x8c43e84, 
locals=0x8c43e84) at Python/ceval.c:495
#7  0x080e5d3c in PyImport_ExecCodeModuleEx (
name=0xbfbfda83 "test.test_curses", co=0x8a8f3c8, 
pathname=0xbfbfd177 
"/usr/home/asmodai/projects/python/Lib/test/test_curses.pyc") at 
Python/import.c:680

#0  0x2889840d in PyCurses_getsyx (self=0x0)
at /dumpster/home/asmodai/projects/python/Modules/_cursesmodule.c:1770
#1  0x080d06d8 in PyEval_EvalFrameEx (f=0x8f4b95c, throwflag=0)
at Python/ceval.c:3635
#2  0x080d1021 in PyEval_EvalFrameEx (f=0x8df8aec, throwflag=0)
at Python/ceval.c:3737
#3  0x080d1021 in PyEval_EvalFrameEx (f=0x8daa08c, throwflag=0)
at Python/ceval.c:3737
#4  0x080d207a in PyEval_EvalCodeEx (co=0x8d86338, globals=0x9831934, 
locals=0x9831934, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, closure=0x0) at Python/ceval.c:2914
#5  0x080d21d7 in PyEval_EvalCode (co=0x8d86338, globals=0x9831934, 
locals=0x9831934) at Python/ceval.c:495
#6  0x080e5b4c in PyImport_ExecCodeModuleEx (
name=0xbfbfdc63 "test.test_curses", co=0x8d86338, 
pathname=0xbfbfd357 
"/dumpster/home/asmodai/projects/python/Lib/test/test_curses.pyc") at 
Python/import.c:680

Both have got me stumped a bit and I have not been able to progress far to
find out why this happens.
I cannot reproduce this on Ubuntu 8.04 at all. And they both use the same
ncurses library, 5.6.

One idea Thomas Dickey had for the last traceback was:

curses.setupterm(fd=sys.__stdout__.fileno())

That would have newscr null.  The failure might be from closing stdout,
e.g., if it was redirected.

Any ideas/hints/tips to finally squash this crashdump?

-- 
Jeroen Ruigrok van der Werven  / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
When we blindly adopt a religion, a political system, a literary dogma,
we become automatons. We cease to grow...
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: trap 12 with interrupts disabled, need help

2008-01-08 Thread Andrew Duane
Obvious question: is your stack set up properly, and is it big enough?
It could be that you haven't set up a bigger kernel stack yet, and have
overrun the small boot stack that the processor was running on. Do you
know what the stack pointer is? If it is a few bytes below a page
boundary, then overrunning the stack is a good guess.

/Andrew
 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-freebsd-
> [EMAIL PROTECTED] On Behalf Of Sharad Chandra
> Sent: Friday, December 28, 2007 12:58 AM
> To: freebsd-hackers@freebsd.org
> Cc: [EMAIL PROTECTED]
> Subject: trap 12 with interrupts disabled, need help
> 
> Hi,
> 
>   I got a message on first boot "pid  (): trap 12 with
> interrupts
> disabled", then it hanged and hard boot is required.
> It does not appears all the time.
> 
> I tried to figure out the problem, trap 12 is stack exception, find at
the
> last
> http://www.acm.uiuc.edu/sigops/roll_your_own/i386/idt.html
> and is coming from kernel,
> The location of this message is /usr/src/
> sys/amd64/amd64/trap.c: "pid %ld (%s): trap %d
with
> interrupts disabled\n",
> 
> What does this exception mean, and what could be possible reason that
my
> program is doing wrong? How to handle it
> 
> Platform: freebsd 6.1 on amd64
> 
> --
> 
> Thanks
> Sharad Chandra
> ___
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to
"[EMAIL PROTECTED]"
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: trap 12 with interrupts disabled, need help

2007-12-28 Thread John Baldwin
On Friday 28 December 2007 12:57:52 am Sharad Chandra wrote:
> Hi,
> 
>   I got a message on first boot "pid  (): trap 12 with 
> interrupts 
> disabled", then it hanged and hard boot is required.
> It does not appears all the time.
> 
> I tried to figure out the problem, trap 12 is stack exception, find at the 
> last
> http://www.acm.uiuc.edu/sigops/roll_your_own/i386/idt.html
> and is coming from kernel,
> The location of this message is /usr/src/
> sys/amd64/amd64/trap.c: "pid %ld (%s): trap %d with 
> interrupts disabled\n",
> 
> What does this exception mean, and what could be possible reason that my 
> program is doing wrong? How to handle it
> 
> Platform: freebsd 6.1 on amd64

Trap numbers in FreeBSD don't quite match up to x86 IDT indices, so trap 12 ia 
actually a page fault.  If it's from userland then somehow userland is 
disabling interrupts which is bad.

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


trap 12 with interrupts disabled, need help

2007-12-27 Thread Sharad Chandra
Hi,

I got a message on first boot "pid  (): trap 12 with 
interrupts 
disabled", then it hanged and hard boot is required.
It does not appears all the time.

I tried to figure out the problem, trap 12 is stack exception, find at the 
last
http://www.acm.uiuc.edu/sigops/roll_your_own/i386/idt.html
and is coming from kernel,
The location of this message is /usr/src/
sys/amd64/amd64/trap.c: "pid %ld (%s): trap %d with 
interrupts disabled\n",

What does this exception mean, and what could be possible reason that my 
program is doing wrong? How to handle it

Platform: freebsd 6.1 on amd64

--

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


Re: need help with sigaction and siginfo_t

2007-11-18 Thread Tijl Coosemans
On Saturday 17 November 2007 17:03:51 nikita kozlov wrote:
> I'm a student and we are working on FreeBSD.
> My problem is i don't understand how to use SA_SIGINFO and siginfo_t.
> The following code caught my SIGUSR1 with a "kill -30 my_server_pid"
> from my shell.
> but siginfo_t is empty when i'm debugging my program with gdb.
> my output is :
> > pid 0
> and in gdb i have :
> {
> si_signo = 30,
> si_errno = 0,
> si_code = 0,
> si_pid = 0,
> si_uid = 0,
> si_status = 0,
> si_addr = 0x2,
> si_value = {sigval_int = 0,sigval_ptr = 0x0},
> si_band = 0,
> __spare__ = {0, 0, 0, 0, 0, 0, 0}
> }
> 
> anyone have an idea why my siginfo_t is empty please ?

Well, it isn't empty. It's just that the si_pid field usually isn't
set. It probably should be, but either way, your code should work if
you send signals with sigqueue(2) instead of kill(2).
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: need help with sigaction and siginfo_t

2007-11-18 Thread Tijl Coosemans
On Sunday 18 November 2007 14:39:41 [EMAIL PROTECTED] wrote:
> Tijl Coosemans <[EMAIL PROTECTED]> a écrit :
>> On Saturday 17 November 2007 17:03:51 nikita kozlov wrote:
>>> I'm a student and we are working on FreeBSD.
>>> My problem is i don't understand how to use SA_SIGINFO and
>>> siginfo_t. The following code caught my SIGUSR1 with a "kill -30
>>> my_server_pid" from my shell.
>>> but siginfo_t is empty when i'm debugging my program with gdb.
>>> my output is :
>>> > pid 0
>>> and in gdb i have :
>>> {
>>> si_signo = 30,
>>> si_errno = 0,
>>> si_code = 0,
>>> si_pid = 0,
>>> si_uid = 0,
>>> si_status = 0,
>>> si_addr = 0x2,
>>> si_value = {sigval_int = 0,sigval_ptr = 0x0},
>>> si_band = 0,
>>> __spare__ = {0, 0, 0, 0, 0, 0, 0}
>>> }
>>>
>>> anyone have an idea why my siginfo_t is empty please ?
>>
>> Well, it isn't empty. It's just that the si_pid field usually isn't
>> set. It probably should be, but either way, your code should work if
>> you send signals with sigqueue(2) instead of kill(2).
> 
> Thank you for the reply,
> i have tried to use sigqueue but after a "undefined reference to
> `sigqueue'" compilation error i have opened signal.h and found this
> define : 
> 
> #if 0
> /*
>   * PR: 35924
>   * XXX we don't actually have these.  We set _POSIX_REALTIME_SIGNALS to 
>   * -1 to show that we don't have them, but this symbol is not necessarily
>   * in scope (in the current implementation), so we can't use it here.
>   */
> int sigqueue(__pid_t, int, const union sigval);
> #endif
> 
> I'm working on FreeBSD 5.5-RELEASE-p14, do you have any idea ?

Hmm, looks like it has only been added in FreeBSD 7. If you can't
upgrade, you'll have to use some more advanced IPC mechanism I'm
afraid.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


need help with sigaction and siginfo_t

2007-11-17 Thread nikita kozlov

hello,
I'm a student and we are working on FreeBSD.
My problem is i don't understand how to use SA_SIGINFO and siginfo_t.
The following code caught my SIGUSR1 with a "kill -30 my_server_pid"
from my shell.
but siginfo_t is empty when i'm debugging my program with gdb.
my output is :
> pid 0
and in gdb i have :
{
si_signo = 30,
si_errno = 0,
si_code = 0,
si_pid = 0,
si_uid = 0,
si_status = 0,
si_addr = 0x2,
si_value = {sigval_int = 0,sigval_ptr = 0x0},
si_band = 0,
__spare__ = {0, 0, 0, 0, 0, 0, 0}
}

anyone have an idea why my siginfo_t is empty please ?
Here is my code:

#include 
#include 
#include 
#include 

static void addtrue(int sig, siginfo_t *info,  void *ctx) 
{ 
printf("pid %i\n", info->si_pid); 
}
 
static void init_server() 
{ 
struct sigaction test; 
memset(&test, 0, sizeof(test)); 
test.sa_flags = SA_SIGINFO; 
test.sa_sigaction = addtrue; 
sigaction(SIGUSR1, &test, NULL); 
getchar();
}

int main() 
{
printf("my pid: %i\n", getpid());
init_server(); 
return (0); 
}



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


Need Help Fixing DSDT For Toshiba Satellite L35-S2366 Laptop (Z00G Object Not Found)

2007-06-22 Thread Mark Lu

I have a Toshiba Satellite L35-S2366 laptop, and the ACPI battery
power information does not work because of a faulty ACPI DSDT. I tried
online guides for hints on how to fix the DSDT, but after some general
fixes, there were two errors that I simply could not work out - Z00G
Object Not Found. I tried Ubuntu Linux and the default DSDT worked
fine.

Here is the original DSDT:
http://www.excelex.net/toshiba-l35-s2366-original.asl

Here is the one with as many errors as I could fix:
http://www.excelex.net/toshiba-l35-s2366-somefixes.asl

Is there anyone who can fix this completely for me?

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


Re: need help / advices with freebsd + asrock 4coredual-vsta (VT8237A)

2007-06-21 Thread didier derny
the problem is not related to the cf reader, the cf reader is working 
with windows

my real problem is the sata  controller VT8237A  not  seen by freebsd

I have the same sata problem even when the cf reader is disconnecter

thanks

til now,  I tried several linux / bsd
freebsd 6.2-stable crash
freebsd 7-current crash (the last snapshot I found on ftp)
netbsd crash
openbsd not tested
 debian 4 works but I dont like linux :(

--
[EMAIL PROTECTED]

[EMAIL PROTECTED] a écrit :

On Tue, 19 Jun 2007, didier derny wrote:



On 19 juin 07, at 15:33, Soeren Straarup wrote:


On Mon, Jun 18, 2007 at 01:14:54PM +0200, didier derny wrote:

I recently bought an asrock 4coredual-vsta mother board
when I tried to install freebsd I saw with horror that 
freebsd6,2-stable

and freebsd7.0-current where coughing when they tried to access the
IDE or SATA
hard disks /cdrom.

it just get stuck after having accessed the hard disk or cdrom



A great help would to have an output of 'boot -v' also known as a 
verbose boot.







I there any hope to see FreeBSD working on this mother board ?

is there anything I can do to help to solve the problem ?

do I have to change my mother board for something else ?
I choosed this one simply because it had a pci express AND an AGP slot

in that case to you have any advice for the video board if I want 
to buy

somethething working with X11 ?

thanks for your help

--
[EMAIL PROTECTED] org



/Soeren


That's a problem with the CF reader. Is your CF reader compatible with 
the driver available in the kernel, and did you build in USB CF 
support to the kernel statically?


-Garrett

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


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


Re: need help / advices with freebsd + asrock 4coredual-vsta (VT8237A)

2007-06-19 Thread youshi10

On Tue, 19 Jun 2007, didier derny wrote:



On 19 juin 07, at 15:33, Soeren Straarup wrote:


On Mon, Jun 18, 2007 at 01:14:54PM +0200, didier derny wrote:

I recently bought an asrock 4coredual-vsta mother board
when I tried to install freebsd I saw with horror that freebsd6,2-stable
and freebsd7.0-current where coughing when they tried to access the
IDE or SATA
hard disks /cdrom.

it just get stuck after having accessed the hard disk or cdrom



A great help would to have an output of 'boot -v' also known as a verbose 
boot.







I there any hope to see FreeBSD working on this mother board ?

is there anything I can do to help to solve the problem ?

do I have to change my mother board for something else ?
I choosed this one simply because it had a pci express AND an AGP slot

in that case to you have any advice for the video board if I want to buy
somethething working with X11 ?

thanks for your help

--
[EMAIL PROTECTED] org



/Soeren


That's a problem with the CF reader. Is your CF reader compatible with the 
driver available in the kernel, and did you build in USB CF support to the 
kernel statically?

-Garrett

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


Re: need help / advices with freebsd + asrock 4coredual-vsta (VT8237A)

2007-06-19 Thread didier derny


On 19 juin 07, at 15:33, Soeren Straarup wrote:


On Mon, Jun 18, 2007 at 01:14:54PM +0200, didier derny wrote:

I recently bought an asrock 4coredual-vsta mother board
when I tried to install freebsd I saw with horror that freebsd6,2- 
stable

and freebsd7.0-current where coughing when they tried to access the
IDE or SATA
hard disks /cdrom.

it just get stuck after having accessed the hard disk or cdrom



A great help would to have an output of 'boot -v' also known as a  
verbose boot.




content of /var/run/dmesg.boot from a system installed on a usb key
(no hard disk visible)

sorry, this is rather lengthy

Copyright (c) 1992-2007 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-STABLE-200706 #0: Sun Jun  3 11:39:06 UTC 2007
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP
Preloaded elf kernel "/boot/kernel/kernel" at 0x80a9e000.
Calibrating clock(s) ... i8254 clock: 1193236 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254" frequency 1193182 Hz quality 0
Calibrating TSC clock ... TSC clock: 1793736679 Hz
CPU: Intel(R) Core(TM)2 CPU  6320  @ 1.86GHz (1793.74-MHz K8- 
class CPU)

  Origin = "GenuineIntel"  Id = 0x6f6  Stepping = 6
   
Features=0xbfebfbff,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
   
Features2=0xe3bd,CX16,XTPR,>

  AMD Features=0x2800
  AMD Features2=0x1
  Cores per package: 2
real memory  = 2147155968 (2047 MB)
Physical memory chunk(s):
0x1000 - 0x0009bfff, 634880 bytes (155 pages)
0x00b9b000 - 0x7c361fff, 2071752704 bytes (505799 pages)
avail memory = 2061488128 (1965 MB)
INTR: Adding local APIC 0 as a target
ACPI APIC Table: 
INTR: Adding local APIC 1 as a target
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1
APIC: CPU 0 has ACPI ID 1
APIC: CPU 1 has ACPI ID 2
MADT: Found IO APIC ID 2, Interrupt 0 at 0xfec0
ioapic0: Routing external 8259A's -> intpin 0
MADT: Found IO APIC ID 3, Interrupt 24 at 0xfecc
MADT: Interrupt override: source 0, irq 2
ioapic0: Routing IRQ 0 -> intpin 2
MADT: Interrupt override: source 9, irq 9
ioapic0: intpin 9 trigger: level
ioapic0: intpin 9 polarity: low
ioapic0  irqs 0-23 on motherboard
ioapic1  irqs 24-47 on motherboard
cpu0 BSP:
 ID: 0x   VER: 0x00050014 LDR: 0x DFR: 0x
  lint0: 0x00010700 lint1: 0x0400 TPR: 0x SVR: 0x01ff
  timer: 0x000100ef therm: 0x0001 err: 0x0001000f pcm: 0x0001
wlan: <802.11 Link Layer>
ath_rate: version 1.2 
null: 
random: 
nfslock: pseudo-device
kbd: new array size 4
kbd1 at kbdmux0
mem: 
io: 
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413,  
RF5413)

rr232x: RocketRAID 232x controller driver v1.02 (Jun  3 2007 11:37:21)
acpi0:  on motherboard
ioapic0: routing intpin 9 (ISA IRQ 9) to vector 48
acpi0: [MPSAFE]
pci_open(1):mode 1 addr port (0x0cf8) is 0x80008f64
pci_open(1a):   mode1res=0x8000 (0x8000)
pci_cfgcheck:   device 0 [class=06] [hdr=80] is there (id=03081106)
AcpiOsDerivePciId: \\_SB_.PCI0.SBRG.HPRG -> bus 0 dev 17 func 0
AcpiOsDerivePciId: \\_SB_.PCI0.SBRG.PIX0 -> bus 0 dev 17 func 0
AcpiOsDerivePciId: \\_SB_.PCI0.SBRG.PIX2 -> bus 0 dev 17 func 0
acpi0: Power Button (fixed)
ACPI timer: 1/1 1/1 1/1 1/1 1/1 1/1 1/2 1/1 1/1 1/1 -> 10
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pci_link0:Index  IRQ  Rtd  Ref  IRQs
  Initial Probe   0   11   N 0  3 4 5 6 7 10 11 12 14 15
  Validation  0   11   N 0  3 4 5 6 7 10 11 12 14 15
  After Disable   0  255   N 0  3 4 5 6 7 10 11 12 14 15
pci_link1:Index  IRQ  Rtd  Ref  IRQs
  Initial Probe   07   N 0  3 4 5 6 7 10 11 12 14 15
  Validation  07   N 0  3 4 5 6 7 10 11 12 14 15
  After Disable   0  255   N 0  3 4 5 6 7 10 11 12 14 15
pci_link2:Index  IRQ  Rtd  Ref  IRQs
  Initial Probe   05   N 0  3 4 5 6 7 10 11 12 14 15
  Validation  05   N 0  3 4 5 6 7 10 11 12 14 15
  After Disable   0  255   N 0  3 4 5 6 7 10 11 12 14 15
pci_link3:Index  IRQ  Rtd  Ref  IRQs
  Initial Probe   03   N 0  3 4 5 6 7 10 11 12 14 15
  Validation  03   N 0  3 4 5 6 7 10 11 12 14 15
  After Disable   0  255   N 0  3 4 5 6 7 10 11 12 14 15
pci_link4:Index  IRQ  Rtd  Ref  IRQs
  Initial Probe   0  255   N 0  3 4 5 6 7 10 11 12 14 15
  Validation  0  255   N 0  3 4 5 6 7 10 11 12 14 15
  After Disable   0  255   N 0  3 4 5 6 7 10 11 12 14 15
pci_link5:Index  IRQ  Rtd  Ref  IRQs
  Initial Probe   0  255   N 0  3 4 5 6 7 10 11 12 14 15
  Validation  0  255  

Re: need help / advices with freebsd + asrock 4coredual-vsta (VT8237A)

2007-06-19 Thread Soeren Straarup
On Mon, Jun 18, 2007 at 01:14:54PM +0200, didier derny wrote:
> I recently bought an asrock 4coredual-vsta mother board
> when I tried to install freebsd I saw with horror that freebsd6,2-stable
> and freebsd7.0-current where coughing when they tried to access the  
> IDE or SATA
> hard disks /cdrom.
> 
> it just get stuck after having accessed the hard disk or cdrom
> 

A great help would to have an output of 'boot -v' also known as a verbose boot.

> I there any hope to see FreeBSD working on this mother board ?
> 
> is there anything I can do to help to solve the problem ?
> 
> do I have to change my mother board for something else ?
> I choosed this one simply because it had a pci express AND an AGP slot
> 
> in that case to you have any advice for the video board if I want to buy
> somethething working with X11 ?
> 
> thanks for your help
> 
> --
> [EMAIL PROTECTED] org
> 

/Soeren

-- 
Soeren Straarup   | aka OZ2DAK aka Xride
FreeBSD committer | FreeBSD since 2.2.6-R
  If a program is not working right, then send a patch
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


need help / advices with freebsd + asrock 4coredual-vsta (VT8237A)

2007-06-18 Thread didier derny

I recently bought an asrock 4coredual-vsta mother board
when I tried to install freebsd I saw with horror that freebsd6,2-stable
and freebsd7.0-current where coughing when they tried to access the  
IDE or SATA

hard disks /cdrom.

it just get stuck after having accessed the hard disk or cdrom

I there any hope to see FreeBSD working on this mother board ?

is there anything I can do to help to solve the problem ?

do I have to change my mother board for something else ?
I choosed this one simply because it had a pci express AND an AGP slot

in that case to you have any advice for the video board if I want to buy
somethething working with X11 ?

thanks for your help

--
[EMAIL PROTECTED] org


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


Need Help - pam_radius

2007-03-09 Thread Mario Saraiva

Hi Community,

I hope that i send this mail to the rigth place.

I'm trying to make authentication using the pam_radius, but i have
some issues that i don't know if it possible to manage.

Is that possible to configure this module to send also other
attributes like "Calling-Station-Id" on the request authentication?
I was google around and didn't find any way how to do it.

Second, after a successful authentication i want to send accounting
information to the server but to the server, the messages "acct-start"
and "acct-stop", but is not working in order to control a PIX firewall
to open and close access to the authenticated user.

At this moment i can authenticate users by ssh but is not sending the
"acct-start" and "acct-stop".

On the log's a receive the following messages:

Mar  9 17:33:31 marte sshd[1237]: Accepted keyboard-interactive/pam
for xmario from 192.168.1.2 port 52923 ssh2
Mar  9 17:33:32 marte sshd[1239]: in openpam_dispatch():
pam_radius.so: no pam_sm_open_session()
Mar  9 17:34:31 marte su: xmario to root on /dev/ttyp0


I'm using FreeBSD 5.4 and i manage the following configuration files:

/etc/radius.conf
auth 10.10.10.1:1812 secret 10
acct 10.10.10.1:1813 secret 10

/etc/pam.d/sshd
#
# $FreeBSD: src/etc/pam.d/sshd,v 1.15 2003/04/30 21:57:54 markm Exp $
#
# PAM configuration for the "sshd" service
#

# auth
authrequiredpam_nologin.so
authrequiredpam_radius.so

# account
#accountrequiredpam_krb5.so
account requiredpam_login_access.so
account requiredpam_unix.so

# session
#sessionoptionalpam_ssh.so
session requiredpam_radius.so
session requiredpam_permit.so

# password
#password   sufficient  pam_krb5.so no_warn try_first_pass
passwordrequiredpam_unix.so no_warn try_first_pass


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


Re: Need help in solving a crash when doing ping flood

2006-11-14 Thread Andre Oppermann

pnallimelli wrote:

Hi,
 When i m doing ping flood , i m getting crash after 15 mins.
The debug messages are like this:

NU gdb 5.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
IdlePTD at physical address 0x00579000
initial pcb at physical address 0x004a58a0
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x50a10800
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc1b177a9
stack pointer   = 0x10:0xcd6ccc64
frame pointer   = 0x10:0xcd6c
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 = 1088 (ping)
interrupt mask  = net tty
trap number = 12
panic: page fault

syncing disks...
done
Uptime: 10m15s
dumping to dev #ad/0x20011, offset 1558871
#0  0xc023d9da in dumpsys ()
(kgdb) where
#0  0xc023d9da in dumpsys ()
#1  0xc023d7ab in boot ()
#2  0xc023dbd0 in poweroff_wait ()
#3  0xc03addfa in trap_fatal ()
#4  0xc03adacd in trap_pfault ()
#5  0xc03ad68b in trap ()
#6  0xc1b177a9 in ?? ()
#7  0xc0283006 in ether_output_frame (ifp=0xc1b1a840, m=0xc0c03900)
   at ../../net/if_var.h:290
#8  0xc0282d36 in ether_output (ifp=0xc1b1a840, m=0xc0c03900, 
dst=0xcd07ff00,

   rt0=0xc1b1ee00) at ../../net/if_ethersubr.c:370
#9  0xc029769d in ip_output (m0=0xc0c03900, opt=0x0, ro=0xcd07fefc, 
flags=32,

   imo=0x0, inp=0xcd07fec0) at ../../netinet/ip_output.c:1004
#10 0xc0298f3a in rip_output (m=0xc0c03900, so=0xcca53340, dst=34212362)
   at ../../netinet/raw_ip.c:299
#11 0xc02993e3 in rip_send (so=0xcca53340, flags=0, m=0xc0c03900,
   nam=0xc134a770, control=0x0, p=0xcc04b220) at ../../netinet/raw_ip.c:630
#12 0xc025cc6b in sosend ()
#13 0xc026022f in sendit ()
#14 0xc0260332 in sendto ()
#15 0xc03ae0a9 in syscall2 ()
#16 0xc039f0c5 in Xint0x80_syscall ()
#17 0x80492e1 in ?? ()

I feel my start() function is having problem.
Could anyone tell me the reason behind this??


My magic crystall ball tells me we'd have to look at your start() function
to make any guess as to why it may be failing.

--
Andre

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


Need help in solving a crash when doing ping flood

2006-11-14 Thread pnallimelli

Hi,
  
   When i m doing ping flood , i m getting crash after 15 mins.

The debug messages are like this:

NU gdb 5.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
IdlePTD at physical address 0x00579000
initial pcb at physical address 0x004a58a0
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x50a10800
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc1b177a9
stack pointer   = 0x10:0xcd6ccc64
frame pointer   = 0x10:0xcd6c
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 = 1088 (ping)
interrupt mask  = net tty
trap number = 12
panic: page fault

syncing disks...
done
Uptime: 10m15s
dumping to dev #ad/0x20011, offset 1558871
#0  0xc023d9da in dumpsys ()
(kgdb) where
#0  0xc023d9da in dumpsys ()
#1  0xc023d7ab in boot ()
#2  0xc023dbd0 in poweroff_wait ()
#3  0xc03addfa in trap_fatal ()
#4  0xc03adacd in trap_pfault ()
#5  0xc03ad68b in trap ()
#6  0xc1b177a9 in ?? ()
#7  0xc0283006 in ether_output_frame (ifp=0xc1b1a840, m=0xc0c03900)
   at ../../net/if_var.h:290
#8  0xc0282d36 in ether_output (ifp=0xc1b1a840, m=0xc0c03900, 
dst=0xcd07ff00,

   rt0=0xc1b1ee00) at ../../net/if_ethersubr.c:370
#9  0xc029769d in ip_output (m0=0xc0c03900, opt=0x0, ro=0xcd07fefc, 
flags=32,

   imo=0x0, inp=0xcd07fec0) at ../../netinet/ip_output.c:1004
#10 0xc0298f3a in rip_output (m=0xc0c03900, so=0xcca53340, dst=34212362)
   at ../../netinet/raw_ip.c:299
#11 0xc02993e3 in rip_send (so=0xcca53340, flags=0, m=0xc0c03900,
   nam=0xc134a770, control=0x0, p=0xcc04b220) at ../../netinet/raw_ip.c:630
#12 0xc025cc6b in sosend ()
#13 0xc026022f in sendit ()
#14 0xc0260332 in sendto ()
#15 0xc03ae0a9 in syscall2 ()
#16 0xc039f0c5 in Xint0x80_syscall ()
#17 0x80492e1 in ?? ()

I feel my start() function is having problem.
Could anyone tell me the reason behind this??

Thanks,
pradeep


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


Re: My machine been hacked, I need help

2006-01-14 Thread anchor (sent by Nabble.com)

Many thanks to all the replies. I need more time to understand them ;) 
I have taken off my machine from the internet to protect further damage. It 
takes me time to research it since I'm not that experienced in the system. The 
machine was hacked my my former system admin. But I need evidence. He put his 
machine IP into my rc.firewall file to allow him sudo. That's the only evidence 
I found. By the way, do sudo also leave logfile somewhere?

There is another problem: The hacker also changed something or maybe added a 
backend process to auto log me out within 1 minute idle. I checked .profile of 
my account and  the root acount. It very hard for to stay a screen and 
thinking, investigating, etc.
--
View this message in context: 
http://www.nabble.com/My-machine-been-hacked%2C-I-need-help-t915435.html#a2381067
Sent from the freebsd-hackers forum at Nabble.com.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: My machine been hacked, I need help

2006-01-14 Thread Cy Schubert
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
writes:
> > In message <[EMAIL PROTECTED]>, "Daniel O'Connor" 
> > writes
> > Only evidence collected by a forensic analysis tool 
> > is admissible in court.
> 
> Not necessarily true.  Log data that is routinely collected can be
> admissible.  Though, log data that you collected starting when you
> suspected there was something amiss will not be.

That is true for logfiles, however Canadian law requires a filesystem 
analysis tool. As little as fiveyears ago taking a DD dump of a device was 
admissible but I've been told by the RCMP that a forensic analysis tool is 
now required. I've been told that this is also true of US law. I'm not sure 
about British or European law.

Unfortunately taking people to court over hacking is difficult but not 
impossible. Police forces are becoming more receptive to the idea and tools 
which have been admitted in court previously make the job of preparing a 
successful case easier.


Cheers,
Cy Schubert <[EMAIL PROTECTED]>
Web:  http://www.komquats.com and http://www.bcbodybuilder.com
FreeBSD UNIX:  <[EMAIL PROTECTED]>   Web:  http://www.FreeBSD.org
BC Government:  <[EMAIL PROTECTED]>

"Lift long enough and I believe arrogance is replaced by
humility and fear by courage and selfishness by generosity
and rudeness by compassion and caring."
-- Dave Draper



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


Re: My machine been hacked, I need help

2006-01-14 Thread les
> In message <[EMAIL PROTECTED]>, "Daniel O'Connor" 
> writes
> Only evidence collected by a forensic analysis tool 
> is admissible in court.

Not necessarily true.  Log data that is routinely collected can be
admissible.  Though, log data that you collected starting when you
suspected there was something amiss will not be.

-Les

-- 
Les Biffle
CISSP   Information Systems Security Consultant
(480) 585-4099   [EMAIL PROTECTED]  http://www.les.biffle.org/
Network Safety,  PO Box 14461,   Scottsdale, AZ 85267
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: My machine been hacked, I need help

2006-01-14 Thread Cy Schubert
In message <[EMAIL PROTECTED]>, "Daniel O'Connor" 
writes
:
> --nextPart1396418.se7W9MObOf
> Content-Type: text/plain;
>   charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
> 
> On Sat, 14 Jan 2006 14:35, anchor (sent by Nabble.com) wrote:
> > My machine been hacked. The message file was modified. Old dated backup
> > files are deleted. The last log was truncated. You are gurus. Would you
> > please tell me where I can find out other trace file or  logfiles to figu=
> re
> > out where the hacker come from?
> 
> 1) Turn it off
> 2) Put a new hard disk in it and install FreeBSD freshly on the new disk
> 3) Mount the old disk read only and recover all the data you can (no  =20
>executables)
> 4) Do forensics on the old disk, and/or back it up to tape.

> 5) Nuke the contents of the old disk.
> 
> Basically it is really hard to trust any code run from the old disk although
> as someone suggested DDB is most likely to be OK, but you never know :)

Probably but if a KLD rootkit was installed, you can't even trust DDB. To 
be on the safe side, panic the system and capture a core dump. Then remove 
the hard disk and analyse that using one of the various analysis tools on 
the market. If you dd the disk to another disk or tape, it is likely that 
if you do discover the perpetrator and take him to court, your evidence 
will not be admissible. Only evidence collected by a forensic analysis tool 
is admissible in court.


Cheers,
Cy Schubert <[EMAIL PROTECTED]>
Web:  http://www.komquats.com and http://www.bcbodybuilder.com
FreeBSD UNIX:  <[EMAIL PROTECTED]>   Web:  http://www.FreeBSD.org
BC Government:  <[EMAIL PROTECTED]>

"Lift long enough and I believe arrogance is replaced by
humility and fear by courage and selfishness by generosity
and rudeness by compassion and caring."
-- Dave Draper



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


Re: My machine been hacked, I need help

2006-01-13 Thread Daniel O'Connor
On Sat, 14 Jan 2006 14:35, anchor (sent by Nabble.com) wrote:
> My machine been hacked. The message file was modified. Old dated backup
> files are deleted. The last log was truncated. You are gurus. Would you
> please tell me where I can find out other trace file or  logfiles to figure
> out where the hacker come from?

1) Turn it off
2) Put a new hard disk in it and install FreeBSD freshly on the new disk
3) Mount the old disk read only and recover all the data you can (no   
   executables)
4) Do forensics on the old disk, and/or back it up to tape.
5) Nuke the contents of the old disk.

Basically it is really hard to trust any code run from the old disk although 
as someone suggested DDB is most likely to be OK, but you never know :)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpuvXTt2INAh.pgp
Description: PGP signature


Re: My machine been hacked, I need help

2006-01-13 Thread Julian Elischer

anchor (sent by Nabble.com) wrote:


My machine been hacked. The message file was modified. Old dated backup files 
are deleted. The last log was truncated. You are gurus. Would you please tell 
me where I can find out other trace file or  logfiles to figure out where the 
hacker come from?

Thanks a lot.
--
View this message in context: 
http://www.nabble.com/My-machine-been-hacked%2C-I-need-help-t915435.html#a2374502
Sent from the freebsd-hackers forum at Nabble.com.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
 

If you can get  into the kernel debugger you may try to do a ps from 
there and see if there are any strange processes running.

of course the first thing to do is physically unplug the machine.
then make a backup for forensic purposes if you can.

you don't say what version of the system it is and what it runs as services.

there are rootkit finders in the ports under 'security'

if you installed from CD see if you can get it from there..

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


My machine been hacked, I need help

2006-01-13 Thread anchor (sent by Nabble.com)

My machine been hacked. The message file was modified. Old dated backup files 
are deleted. The last log was truncated. You are gurus. Would you please tell 
me where I can find out other trace file or  logfiles to figure out where the 
hacker come from?

Thanks a lot.
--
View this message in context: 
http://www.nabble.com/My-machine-been-hacked%2C-I-need-help-t915435.html#a2374502
Sent from the freebsd-hackers forum at Nabble.com.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Need Help In sppp_attach

2005-11-11 Thread Julian Elischer

rashmi ns wrote:


Hello List ,
I'm writing a hdlc driver we want to send traffic to the driver and test.
But I have some basic doubts regarding sppp .Kindly Give your suggestions
1.How to run PPP on FreeBSD system.
2.What configuration needs to be done in order to send traffic using HDLC
driver.
Thanks For your Suggestions In Advance
 

personally I'd put a netgraph interface on it and then use mpd to 
control the ppp..

But hey, I'm biased.


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


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


Need Help In sppp_attach

2005-11-10 Thread rashmi ns
Hello List ,
I'm writing a hdlc driver we want to send traffic to the driver and test.
But I have some basic doubts regarding sppp .Kindly Give your suggestions
1.How to run PPP on FreeBSD system.
2.What configuration needs to be done in order to send traffic using HDLC
driver.
Thanks For your Suggestions In Advance
Regards,
Rashmi.n.s
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Crash in bge_newbuf_std on 5.4 - need help with debugging

2005-08-19 Thread Olafur Osvaldsson
Hi,
Maybe someone more experienced than me could help me out with this...


(kgdb) bt
#0  doadump () at pcpu.h:159
#1  0xc060c5ef in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:410
#2  0xc060c915 in panic (fmt=0xc07fd250 "%s") at 
/usr/src/sys/kern/kern_shutdown.c:566
#3  0xc07b26d4 in trap_fatal (frame=0xe67d8bbc, eva=3217031168)
at /usr/src/sys/i386/i386/trap.c:817
#4  0xc07b2417 in trap_pfault (frame=0xe67d8bbc, usermode=0, eva=3217031168)
at /usr/src/sys/i386/i386/trap.c:735
#5  0xc07b2051 in trap (frame=
  {tf_fs = -1067384808, tf_es = -1018167280, tf_ds = -1064501232, tf_edi = 
-1016803328, tf_esi = -426416128, tf_ebp = -427979700, tf_isp = -427979800, 
tf_ebx = -1012528640, tf_edx = 0, tf_ecx = 2, tf_eax = 0, tf_trapno = 12, 
tf_err = 0, tf_eip = -1065755687, tf_cs = 8, tf_eflags = 66118, tf_esp
= -1018649728, tf_ss = -1017978880}) at /usr/src/sys/i386/i386/trap.c:425
#6  0xc079fdba in calltrap () at /usr/src/sys/i386/i386/exception.s:140
#7  0xc0610018 in tdsigwakeup (td=0xc3a60a00, sig=0, action=0xc364d000)
at /usr/src/sys/kern/kern_sig.c:1972
#8  0xc04d5928 in bge_newbuf_std (sc=0xc364d000, i=192, m=0x0) at 
/usr/src/sys/dev/bge/if_bge.c:915
#9  0xc04d883c in bge_rxeof (sc=0xc364d000) at 
/usr/src/sys/dev/bge/if_bge.c:2768
#10 0xc04d8c60 in bge_intr (xsc=0xc364d000) at 
/usr/src/sys/dev/bge/if_bge.c:2975
#11 0xc05f8599 in ithread_loop (arg=0xc3480e00) at 
/usr/src/sys/kern/kern_intr.c:547
#12 0xc05f7635 in fork_exit (callout=0xc05f8440 , arg=0xc3480e00, 
frame=0xe67d8d48)
at /usr/src/sys/kern/kern_fork.c:791
#13 0xc079fe1c in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209
(kgdb) up 8
#8  0xc04d5928 in bge_newbuf_std (sc=0xc364d000, i=192, m=0x0) at 
/usr/src/sys/dev/bge/if_bge.c:915
915 error = bus_dmamap_load(sc->bge_cdata.bge_mtag,
(kgdb) list
910 m_adj(m_new, ETHER_ALIGN);
911 sc->bge_cdata.bge_rx_std_chain[i] = m_new;
912 r = &sc->bge_ldata.bge_rx_std_ring[i];
913 ctx.bge_maxsegs = 1;
914 ctx.sc = sc;
915 error = bus_dmamap_load(sc->bge_cdata.bge_mtag,
916 sc->bge_cdata.bge_rx_std_dmamap[i], mtod(m_new, void *),
917 m_new->m_len, bge_dma_map_addr, &ctx, BUS_DMA_NOWAIT);
918 if (error || ctx.bge_maxsegs == 0) {
919 if (m == NULL)
(kgdb) print sc->bge_cdata.bge_mtag
$6 = 0xc3628700
(kgdb) print sc->bge_cdata.bge_rx_std_dmamap[i]
$7 = 0x0
(kgdb) print i
$8 = 192
(kgdb) print m_new
$9 = (struct mbuf *) 0xc3a60a00
(kgdb) print m_new->m_len
There is no member named m_len.
(kgdb) print bge_dma_map_addr
$10 = {void (void *, bus_dma_segment_t *, int, int)} 0xc04d5118 

(kgdb) print ctx
$11 = {sc = 0xc364d000, bge_busaddr = 3866987660, bge_flags = 53549, bge_idx = 
131,
  bge_maxsegs = 1, bge_ring = 0xc3508180}


The things that strike me there is the lack of "m_new->m_len" and the NULL in 
the second
parameter...I don't know enaugh to say if either is OK.

Any ideas or suggestions on the next step?

/Oli

-- 
Olafur Osvaldsson
Systems Administrator
Internet a Islandi hf.
Tel:   +354 525-5291
Email: [EMAIL PROTECTED]


pgpzSX3kO2YZ6.pgp
Description: PGP signature


Re: need help in rebuilding to Freebsd 5.3

2005-05-14 Thread Albert Vest
On Tue, 30 Nov 2004 20:30:46 +0530
"Kamal R. Prasad" <[EMAIL PROTECTED]> wrote:

> 
> Hello,
> 
>   I am not aware whether this is the right mailing list -so pl. advise 
> where to send in my request if it isn't. I am running Freebsd 5.2.1
> 
> I have sources from CD on my /usr/src -and want to upgrade to Stable 5.3.
> 
...
> cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs 
> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline 
> -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. 
> -I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica 
> -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter 
> -I/usr/src/sys/contrib/pf -I/usr/src/sys/contrib/dev/ath 
> -I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm 
> -D_KERNEL -include opt_global.h -finline-limit=8000 --param 
> inline-unit-growth=100 --param large-function-growth=1000 
> -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding 
> /usr/src/sys/i386/i386/genassym.c
> cc1: error: invalid parameter `inline-unit-growth'
> cc1: error: invalid parameter `large-function-growth'
> *** Error code 1
> 
> Stop in /usr/obj/usr/src/sys/GENERIC.
> *** Error code 1
> 
> Stop in /usr/obj/usr/src/sys/GENERIC.
> *** Error code 1
> 
> Stop in /usr/src.
> *** Error code 1
> 
> Stop in /usr/src.
> 
> -
> Appreciate any help on this.
> 
> thanks
> -kamal

GCC isn't recognizing those growth parameters.  I've rebuilt 5.3-stable a few 
times, using those parameters, no problems, but I installed from the 5.3 CD.  
What version of GCC are you running?  System default on 5.3 is 3.4.2 (20040728)


-- 
Albert Vest, al vest at earth link dot net
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Need help analyzing a 5.3-RELEASE-p2 crash

2005-01-12 Thread Olafur Osvaldsson
This is what I got, could someone help me with the next steps?

==

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 00
fault virtual address   = 0x413db14b
fault code  = supervisor write, page not present
instruction pointer = 0x8:0xc06272e2
stack pointer   = 0x10:0xe75cd9bc
frame pointer   = 0x10:0xe75cd9c4
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 = 6535 (sshd)
trap number = 12
panic: page fault

cpuid = 1
boot() called on cpu#1
Uptime: 12d6h22m21s
Dumping 1023 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 
352 368 384 400 416 432 448 464 480 496 512 528 544 560 576 592 608 624 640 656 
672 688 704 720 736 752 768 784 800 816 832 848 864 880 896 912 928 944 960 976 
992 1008

==

Backtrace:

#0  doadump () at pcpu.h:159
#1  0xc060560f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc0605935 in panic (fmt=0xc07f164a "%s") at 
/usr/src/sys/kern/kern_shutdown.c:553
#3  0xc07a78c4 in trap_fatal (frame=0xe75cd97c, eva=1094562123)
at /usr/src/sys/i386/i386/trap.c:809
#4  0xc07a7607 in trap_pfault (frame=0xe75cd97c, usermode=0, eva=1094562123)
at /usr/src/sys/i386/i386/trap.c:727
#5  0xc07a7241 in trap (frame=
  {tf_fs = -413401064, tf_es = -1067515888, tf_ds = -413401072, tf_edi = 
-1033200280, tf_esi = 1103114931, tf_ebp = -413345340, tf_isp = -413345368, 
tf_ebx = -1033594764, tf_edx = 1094562119, tf_ecx = -1064546620, tf_eax = 0, 
tf_trapno = 12, tf_err = 2, tf_eip = -1067289886, tf_cs = 8, tf_eflags = 66054, 
tf_esp = -1033594880, tf_ss = -1031246336}) at /usr/src/sys/i386/i386/trap.c:417
#6  0xc079552a in calltrap () at /usr/src/sys/i386/i386/exception.s:140
#7  0xe75c0018 in ?? ()
#8  0xc05f0010 in fork1 (td=0xc2649874, flags=89, pages=-413345304, 
procp=0xc0633e91) at pcpu.h:159
#9  0xc0627236 in selwakeuppri (sip=0xc2649874, pri=89) at 
/usr/src/sys/kern/sys_generic.c:1096
#10 0xc0633e91 in ttwakeup (tp=0x10206) at /usr/src/sys/kern/tty.c:2366
#11 0xc0632b38 in ttymodem (tp=0xc2649800, flag=0) at 
/usr/src/sys/kern/tty.c:1625
#12 0xc0636823 in ptcopen (dev=0xc2886e00, flag=3, devtype=8192, td=0x0) at 
linedisc.h:136
#13 0xc05cda2e in spec_open (ap=0xe75cda84) at 
/usr/src/sys/fs/specfs/spec_vnops.c:207
#14 0xc05cd773 in spec_vnoperate (ap=0x0) at 
/usr/src/sys/fs/specfs/spec_vnops.c:118
#15 0xc0663861 in vn_open_cred (ndp=0xe75cdbe4, flagp=0xe75cdce4, cmode=0, 
cred=0xc2892180, 
fdidx=0) at vnode_if.h:228
#16 0xc0663446 in vn_open (ndp=0x0, flagp=0xe75cdce4, cmode=0, fdidx=3)
at /usr/src/sys/kern/vfs_vnops.c:91
#17 0xc065d55f in kern_open (td=0xc3074190, path=0x0, pathseg=UIO_USERSPACE, 
flags=3, mode=0)
at /usr/src/sys/kern/vfs_syscalls.c:957
#18 0xc065d478 in open (td=0xc3074190, uap=0x0) at 
/usr/src/sys/kern/vfs_syscalls.c:926
#19 0xc07a7bcf in syscall (frame=
  {tf_fs = 47, tf_es = 134676527, tf_ds = -1078001617, tf_edi = 
-1077943125, tf_esi = 671947821, tf_ebp = -1077943096, tf_isp = -413344396, 
tf_ebx = 671955040, tf_edx = 671947836, tf_ecx = 674477548, tf_eax = 5, 
tf_trapno = 12, tf_err = 2, tf_eip = 673989911, tf_cs = 31, tf_eflags = 658, 
tf_esp = -1077943188, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1001
#20 0xc079557f in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:201
#21 0x002f in ?? ()
#22 0x0807002f in ?? ()
#23 0xbfbf002f in ?? ()
#24 0xbfbfe4ab in ?? ()
#25 0x280d1c2d in ?? ()
#26 0xbfbfe4c8 in ?? ()
#27 0xe75cdd74 in ?? ()
#28 0x280d3860 in ?? ()
#29 0x280d1c3c in ?? ()
#30 0x2833b5ec in ?? ()
#31 0x0005 in ?? ()
#32 0x000c in ?? ()
#33 0x0002 in ?? ()
#34 0x282c4517 in ?? ()
#35 0x001f in ?? ()
#36 0x0292 in ?? ()
#37 0xbfbfe46c in ?? ()
#38 0x002f in ?? ()
#39 0x73652528 in ?? ()
#40 0x090a2970 in ?? ()
#41 0x6c6c6163 in ?? ()
#42 0x67657209 in ?? ()
#43 0x1fc83000 in ?? ()
#44 0xc307254c in ?? ()
#45 0xc3074190 in ?? ()
#46 0xe75cdb00 in ?? ()
#47 0xe75cdae8 in ?? ()
#48 0xc22644b0 in ?? ()
#49 0xc0615c17 in sched_switch (td=0x280d1c2d, newtd=0x280d3860, flags=Cannot 
access memory at address 0xbfbfe4d8
)
at /usr/src/sys/kern/sched_4bsd.c:865

-- 
Ólafur Osvaldsson
Kerfisstjóri
Internet á Íslandi hf.
Sími:  525-5291
Email: [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


need help in rebuilding to Freebsd 5.3

2004-11-30 Thread Kamal R. Prasad
Hello,
 I am not aware whether this is the right mailing list -so pl. advise 
where to send in my request if it isn't. I am running Freebsd 5.2.1

I have sources from CD on my /usr/src -and want to upgrade to Stable 5.3.
I downloaded CVSup and the supfile to get RELENG_5_3. I found that it 
does not download files in the attic [and there is no attic directory at 
my end]. The 'make buildworld' fails without the file 
/usr/src/contrib/gperf/lib/getopt.h.
I notice Cvsup hasn't downloaded the file getopt.c either or any other 
files in attic. I tried changing tag to '.' and it doesn't help either. 
I have a low bandwidth connection, so pl. give me a clue on how to sync 
up everything.

The 'make buildkernel' also fails with the following error:-
--
--
>>> stage 3.1: making dependencies
--
cd /usr/obj/usr/src/sys/GENERIC;  MAKEOBJDIRPREFIX=/usr/obj 
MACHINE_ARCH=i386  MACHINE=i386  CPUTYPE= 
GROFF_BIN_PATH=/usr/obj/usr/src/i386/legacy/usr/bin 
GROFF_FONT_PATH=/usr/obj/usr/src/i386/legacy/usr/share/groff_font 
GROFF_TMAC_PATH=/usr/obj/usr/src/i386/legacy/usr/share/tmac 
DESTDIR=/usr/obj/usr/src/i386  _SHLIBDIRPREFIX=/usr/obj/usr/src/i386 
INSTALL="sh /usr/src/tools/install.sh" 
PATH=/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/usr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin 
/usr/obj/usr/src/make.i386/make KERNEL=kernel depend -DNO_MODULES_OBJ
rm -f .olddep
if [ -f .depend ]; then mv .depend .olddep; fi
/usr/obj/usr/src/make.i386/make _kernel-depend
cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline 
-Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. 
-I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica 
-I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter 
-I/usr/src/sys/contrib/pf -I/usr/src/sys/contrib/dev/ath 
-I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm 
-D_KERNEL -include opt_global.h -finline-limit=8000 --param 
inline-unit-growth=100 --param large-function-growth=1000 
-mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding 
/usr/src/sys/i386/i386/genassym.c
cc1: error: invalid parameter `inline-unit-growth'
cc1: error: invalid parameter `large-function-growth'
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1
Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
-
Appreciate any help on this.
thanks
-kamal
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Need help debugging kernel

2004-10-14 Thread Asko Tamm
Hi,
Please help me with kernel debugging. The situation is the following:
system panics and reboots about every 24 hours (24 hours since last
reboot), 4.10-STABLE on i386. It shouldn't be a hardware issue, it
happens on several different machines, having similar configuration.
Systems are running named, postfix, apache, samba, dhcpd, lpd, webmin,
mpd, etc. with the similar configuration.
Kernel has following additions to GENERIC - options: DUMMYNET,
NMBCLUSTERS=8192, NETGRAPH, IPFIREWALL, IPFIREWALL_VERBOSE,
IPFIREWALL_FORWARD, IPDIVERT, IPSTEALTH, TCPDEBUG
$ gdb -k kernel.debug /usr/crash/vmcore.1
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read
called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 933 in fill_symbuf
IdlePTD at physical address 0x00591000
initial pcb at physical address 0x004b1120
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address= 0xad243ff3
fault code= supervisor read, page not present
instruction pointer= 0x8:0xc027c55b
stack pointer= 0x10:0xd2e8ad98
frame pointer= 0x10:0xd2e8ae1c
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= 407 (nmbd)
interrupt mask= none
trap number= 12
panic: page fault
syncing disks... 14 3
done
Uptime: 23h53m31s
dumping to dev #ad/0x20011, offset 1589376
dump ata1: resetting devices .. done
247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230
229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212
211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194
193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176
175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158
157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140
139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122
121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104
103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57
56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
[EMAIL PROTECTED]
#0  dumpsys () at ../../kern/kern_shutdown.c:487
487if (dumping++) {
(kgdb) list *0xc027c55b
0xc027c55b is in ifconf (../../net/if.c:1330).
1325addrs = 0;
1326ifa = ifp->if_addrhead.tqh_first;
1327TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
1328if (space <= sizeof(ifr))
1329break;
1330sa = ifa->ifa_addr;
1331if (curproc->p_prison && prison_if(curproc, sa))
1332continue;
1333addrs++;
1334#ifdef COMPAT_43
(kgdb) backtrace
#0  dumpsys () at ../../kern/kern_shutdown.c:487
#1  0xc0237c73 in boot (howto=256) at ../../kern/kern_shutdown.c:316
#2  0xc0238098 in poweroff_wait (junk=0xc0447fec, howto=-1069253905)
   at ../../kern/kern_shutdown.c:595
#3  0xc03b9d9a in trap_fatal (frame=0xd2e8ad58, eva=2904834035)
   at ../../i386/i386/trap.c:974
#4  0xc03b9a6d in trap_pfault (frame=0xd2e8ad58, usermode=0, eva=2904834035)
   at ../../i386/i386/trap.c:867
#5  0xc03b962b in trap (frame={tf_fs = -1078001648, tf_es = -756547568,
 tf_ds = 16, tf_edi = 7708, tf_esi = -1077949100, tf_ebp = -756503012,
 tf_isp = -756503164, tf_ebx = -1033036164, tf_edx = -756514816,
 tf_ecx = 0, tf_eax = -1390133261, tf_trapno = 12, tf_err = 0,
 tf_eip = -1071135397, tf_cs = 8, tf_eflags = 66054, tf_esp =
-757485376,
 tf_ss = -1073190620}) at ../../i386/i386/trap.c:466
#6  0xc027c55b in ifconf (cmd=3221776676, data=0xd2e8aea8 "")
   at ../../net/if.c:1330
#7  0xc027bd1d in ifioctl (so=0xd197e9c0, cmd=3221776676,
data=0xd2e8aea8 "",
   p=0xd2d9b0c0) at ../../net/if.c:968
#8  0xc024a63a in soo_ioctl (fp=0xc2a49ec0, cmd=3221776676,
   data=0xd2e8aea8 "", p=0xd2d9b0c0) at ../../kern/sys_socket.c:143
#9  0xc0247536 in ioctl (p=0xd2d9b0c0, uap=0xd2e8af80) at
../../sys/file.h:178
#10 0xc03ba049 in syscall2 (frame={tf_fs = 135069743, tf_es = 47,
 tf_ds = -1078001617, tf_edi = -1077937824, tf_esi = -1077941280,
---Type  to continue, or q  to quit---
 tf_ebp = -1077941392, tf_isp = -756502572, tf_ebx = 1097604547,
 tf_edx = -1077949584, tf_ecx = 0, tf_eax = 54, tf_trapno = 7,
 tf_err = 2, tf_eip = 673566372, tf_cs = 31, tf_eflags = 659,
 tf_esp = -1077949660, tf_ss = 47}) at ../../i386/i386

Need help debugging kernel

2004-10-14 Thread Asko Tamm
Hi,
Please help me with kernel debugging. The situation is the following:
system panics and reboots about every 24 hours (24 hours since last
reboot), 4.10-STABLE on i386. It shouldn't be a hardware issue, it
happens on several different machines, having similar configuration.
Systems are running named, postfix, apache, samba, dhcpd, lpd, webmin,
mpd, etc. with the similar configuration.
Kernel has following additions to GENERIC - options: DUMMYNET,
NMBCLUSTERS=8192, NETGRAPH, IPFIREWALL, IPFIREWALL_VERBOSE,
IPFIREWALL_FORWARD, IPDIVERT, IPSTEALTH, TCPDEBUG
$ gdb -k kernel.debug /usr/crash/vmcore.1
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read
called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 933 in fill_symbuf
IdlePTD at physical address 0x00591000
initial pcb at physical address 0x004b1120
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address= 0xad243ff3
fault code= supervisor read, page not present
instruction pointer= 0x8:0xc027c55b
stack pointer= 0x10:0xd2e8ad98
frame pointer= 0x10:0xd2e8ae1c
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= 407 (nmbd)
interrupt mask= none
trap number= 12
panic: page fault
syncing disks... 14 3
done
Uptime: 23h53m31s
dumping to dev #ad/0x20011, offset 1589376
dump ata1: resetting devices .. done
247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230
229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212
211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194
193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176
175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158
157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140
139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122
121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104
103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81
80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57
56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
[EMAIL PROTECTED]
#0  dumpsys () at ../../kern/kern_shutdown.c:487
487if (dumping++) {
(kgdb) list *0xc027c55b
0xc027c55b is in ifconf (../../net/if.c:1330).
1325addrs = 0;
1326ifa = ifp->if_addrhead.tqh_first;
1327TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
1328if (space <= sizeof(ifr))
1329break;
1330sa = ifa->ifa_addr;
1331if (curproc->p_prison && prison_if(curproc, sa))
1332continue;
1333addrs++;
1334#ifdef COMPAT_43
(kgdb) backtrace
#0  dumpsys () at ../../kern/kern_shutdown.c:487
#1  0xc0237c73 in boot (howto=256) at ../../kern/kern_shutdown.c:316
#2  0xc0238098 in poweroff_wait (junk=0xc0447fec, howto=-1069253905)
   at ../../kern/kern_shutdown.c:595
#3  0xc03b9d9a in trap_fatal (frame=0xd2e8ad58, eva=2904834035)
   at ../../i386/i386/trap.c:974
#4  0xc03b9a6d in trap_pfault (frame=0xd2e8ad58, usermode=0, eva=2904834035)
   at ../../i386/i386/trap.c:867
#5  0xc03b962b in trap (frame={tf_fs = -1078001648, tf_es = -756547568,
 tf_ds = 16, tf_edi = 7708, tf_esi = -1077949100, tf_ebp = -756503012,
 tf_isp = -756503164, tf_ebx = -1033036164, tf_edx = -756514816,
 tf_ecx = 0, tf_eax = -1390133261, tf_trapno = 12, tf_err = 0,
 tf_eip = -1071135397, tf_cs = 8, tf_eflags = 66054, tf_esp =
-757485376,
 tf_ss = -1073190620}) at ../../i386/i386/trap.c:466
#6  0xc027c55b in ifconf (cmd=3221776676, data=0xd2e8aea8 "")
   at ../../net/if.c:1330
#7  0xc027bd1d in ifioctl (so=0xd197e9c0, cmd=3221776676,
data=0xd2e8aea8 "",
   p=0xd2d9b0c0) at ../../net/if.c:968
#8  0xc024a63a in soo_ioctl (fp=0xc2a49ec0, cmd=3221776676,
   data=0xd2e8aea8 "", p=0xd2d9b0c0) at ../../kern/sys_socket.c:143
#9  0xc0247536 in ioctl (p=0xd2d9b0c0, uap=0xd2e8af80) at
../../sys/file.h:178
#10 0xc03ba049 in syscall2 (frame={tf_fs = 135069743, tf_es = 47,
 tf_ds = -1078001617, tf_edi = -1077937824, tf_esi = -1077941280,
---Type  to continue, or q  to quit---
 tf_ebp = -1077941392, tf_isp = -756502572, tf_ebx = 1097604547,
 tf_edx = -1077949584, tf_ecx = 0, tf_eax = 54, tf_trapno = 7,
 tf_err = 2, tf_eip = 673566372, tf_cs = 31, tf_eflags = 659,
 tf_esp = -1077949660, tf_ss = 47}) at ../../i386/i386

Re: Debugging APIC problem (R5.2.1 vt-8235 ata failure no interrupt), need help

2004-07-01 Thread Jiafu He
John Baldwin <[EMAIL PROTECTED]> wrote: On Friday 02 July 2004 12:02 am, Jiafu He 
wrote:
> John Baldwin wrote:
>
> On Thursday 01 July 2004 10:12 pm, Jiafu He wrote:
> > Hi, folks,
> >
> > Rel 5.2.1 can't be installed on my machine due to APIC problems. The
> > error message is like "ata0-master: FAILURE - ATA_IDENTIFY no interrupt".
> > It is a Soyo motherboard "SY-P4VGA" with VIA VT-8235 south bridge.
> >
> > Debugging results using DDB ("show intrcnt") show no interrupts ever
> > occur. Disable the APIC feature on BIOS, then the disk is detected and
> > everything works fine. Installing release 5.1 and 4.10 both work perfect.
> > So I guess there must be problems with the APIC or IO APIC initialization
> > code in release 5.2.1.
>
> Do you have a dmesg output with APIC enabled?
>
> I can see it on my monitor, However I can't even have my disk attached, do
> I have a way to save it anywhere? :( If you want a dmesg from R5.1, I can
> send it to you.
>
> Jiafu

Do you have a serial console?


I tried to mount fixit floppy. looks like floppy controller can't be found either. I 
should have a serial cable around. Not sure whether it works for PC or not, I used it 
for debugging ARM. I'll get it back to you tomorrow. Too late today.
 
In order not to mess up with the mailing list. I'll send it directly to you.
 
Thanks.
 
Jiafu 


-
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Debugging APIC problem (R5.2.1 vt-8235 ata failure no interrupt), need help

2004-07-01 Thread John Baldwin
On Friday 02 July 2004 12:02 am, Jiafu He wrote:
> John Baldwin <[EMAIL PROTECTED]> wrote:
>
> On Thursday 01 July 2004 10:12 pm, Jiafu He wrote:
> > Hi, folks,
> >
> > Rel 5.2.1 can't be installed on my machine due to APIC problems. The
> > error message is like "ata0-master: FAILURE - ATA_IDENTIFY no interrupt".
> > It is a Soyo motherboard "SY-P4VGA" with VIA VT-8235 south bridge.
> >
> > Debugging results using DDB ("show intrcnt") show no interrupts ever
> > occur. Disable the APIC feature on BIOS, then the disk is detected and
> > everything works fine. Installing release 5.1 and 4.10 both work perfect.
> > So I guess there must be problems with the APIC or IO APIC initialization
> > code in release 5.2.1.
>
> Do you have a dmesg output with APIC enabled?
>
> I can see it on my monitor, However I can't even have my disk attached, do
> I have a way to save it anywhere? :( If you want a dmesg from R5.1, I can
> send it to you.
>
> Jiafu

Do you have a serial console?

-- 
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: Debugging APIC problem (R5.2.1 vt-8235 ata failure no interrupt), need help

2004-07-01 Thread Jiafu He
John Baldwin <[EMAIL PROTECTED]> wrote: 
On Thursday 01 July 2004 10:12 pm, Jiafu He wrote:
> Hi, folks,
>
> Rel 5.2.1 can't be installed on my machine due to APIC problems. The error
> message is like "ata0-master: FAILURE - ATA_IDENTIFY no interrupt". It is a
> Soyo motherboard "SY-P4VGA" with VIA VT-8235 south bridge.
>
> Debugging results using DDB ("show intrcnt") show no interrupts ever occur.
> Disable the APIC feature on BIOS, then the disk is detected and everything
> works fine. Installing release 5.1 and 4.10 both work perfect. So I guess
> there must be problems with the APIC or IO APIC initialization code in
> release 5.2.1.

Do you have a dmesg output with APIC enabled?

I can see it on my monitor, However I can't even have my disk attached, do I have a 
way to save it anywhere? :( If you want a dmesg from R5.1, I can send it to you.
 
Jiafu
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Debugging APIC problem (R5.2.1 vt-8235 ata failure no interrupt), need help

2004-07-01 Thread John Baldwin
On Thursday 01 July 2004 10:12 pm, Jiafu He wrote:
> Hi, folks,
>
> Rel 5.2.1 can't be installed on my machine due to APIC problems. The error
> message is like "ata0-master: FAILURE - ATA_IDENTIFY no interrupt". It is a
> Soyo motherboard "SY-P4VGA" with VIA VT-8235 south bridge.
>
> Debugging results using DDB ("show intrcnt") show no interrupts ever occur.
> Disable the APIC feature on BIOS, then the disk is detected and everything
> works fine. Installing release 5.1 and 4.10 both work perfect. So I guess
> there must be problems with the APIC or IO APIC initialization code in
> release 5.2.1.

Do you have a dmesg output with APIC enabled?

-- 
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]"


Debugging APIC problem (R5.2.1 vt-8235 ata failure no interrupt), need help

2004-07-01 Thread Jiafu He
Hi, folks,
 
Rel 5.2.1 can't be installed on my machine due to APIC problems. The error message is 
like "ata0-master: FAILURE - ATA_IDENTIFY no interrupt". It is a Soyo motherboard 
"SY-P4VGA" with VIA VT-8235 south bridge.
 
Debugging results using DDB ("show intrcnt") show no interrupts ever occur. Disable 
the APIC feature on BIOS, then the disk is detected and everything works fine. 
Installing release 5.1 and 4.10 both work perfect. So I guess there must be problems 
with the APIC or IO APIC initialization code in release 5.2.1. 
 
Below are the printouts by calling lapic_dump():
If ENABLE APIC in BIOS:
-
ID:0xVER:0x00050014  LDR:0x0100 DFR:0x0fff
Lint0:0x00010700 Lint1:0x0400 TPR:0x SVR:0x01ff
--
 
If DISABLE APIC in BIOS:
--
ID:0xf000fea5 VER:0xf000ef6fLDR:0xf000e816 DFR:0xf000e816
Lint0:0xef1b8579 Lint 1:0xef19 TPR:0xf000e816 SVR:0xf000e816
--
 
The bit 16 of Lint0 (mask bit) is 1 in the former case. Is that the cause of the 
problem? Problem not, since now IOAPIC in VT-8235 is used and Lint0 may not be useful 
any longer (pls correct me if the statement is wrong). Try to change the setting by 
writing to the LVT but couldn't succeed. I am still not so familiar with the Pentium 
architecture and need more time to practice.
 
Any comments and help are welcome.
 
Thanks in advance.
 
Jiafu
 


-
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: need help on CFLAGS in /etc/make.conf please

2004-02-13 Thread Richard Coleman
Paul Seniura wrote:
Chapter 2 of "FreeBSD Developers' Handbook":

| 2.4 Compiling with cc
|
| -O
|Create an optimized version of the executable.  The compiler
|performs various clever tricks to try and produce an executable 
|that runs faster than normal.  You can add a number after the -O
|to specify a higher level of optimization, but this often exposes
|bugs in the compiler's optimizer.  For instance, the version of cc
|that comes with the 2.1.0 release of FreeBSD is known to produce
|bad code with the -O2 option in some circumstances.
|
|Optimization is usually only turned on when compiling a release
|version.
|[...]

HUH?!?  "the version of cc that comes with 2.1.0" has those -O bugs
Good grief, we're running 5.x (-Current, actually)!
I can't find any mention of any such bugs with GCC 3.x on i386.
Unless there is evidence of more recent gcc bugs, that part of the 
handbook should really be removed.

I can easily imagine the reaction on this list if the reverse were true, 
and the gcc handbook was knocking FreeBSD for a bug in release 3.0 (or 
whatever).

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


Re: need help on CFLAGS in /etc/make.conf please

2004-02-13 Thread Paul Seniura

> On Thu, Feb 12, 2004 at 09:56:08PM -0600, Paul Seniura wrote:
> >
> > Hi Kris,
> >
> > > On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote:
> > > >
> > > > Hi y'all,
> > > >
> > > > I'm trying to find a way to do a CFLAGS+='-O' if and only if such a
> > > > parm was not already provided before 'make' actually runs.
> > > >
> > > > I had this coded with the single = sign, i.e. without ?= or +=, but
> > > > the process still acts as if += was coded anyway, thus tacking on
> > > > my -O *after* the port's own CFLAGS.
> > > >
> > > > GCC33 docs say the _last_ -O# is the one that will be used.
> > > >
> > > > I've seen other discussion on using -O2 but the point seems to be the
> > > > ports that set -O2 explicitly are likely to work correctly.
> >
> > On Thu 12 Feb 2004 17:13:25 -0800, Kris Kennaway replied:
> > > That's not a good assumption; many ports simply add -O2 (or -O3, or
> > > -O999) because the authors "want their code to run fast".  The set of
> > > ports for which the authors have run full regression suites for all
> > > supported versions of gcc and all supported OS and architecture
> > > combinations is probably the null set.
> >
> > Thank you for responding, but I'm *really* not wanting this to
> > become another discussion on "how high my Oh-levels should be". ;)
> >
> > My question for this discussion is specifically how to prevent
> > overriding a port's own setting for that parm, and to provide a
> > default setting -O[1] when the port does not set it at all?
> >
> > (I'll save my l-o-n-g-e-r reply for later... believe me I have reasons ;)

On Thu 12 Feb 2004 20:09:31 -0800, Kris Kennaway replied:
> There's no general way.  Some ports do ${CFLAGS} -O999, some do -O999
> ${CFLAGS}.

While I haven't seen anything near -O999 yet (and I was a noobee in the
1980s with Microware OS-9[tm] on the CoCo3 [Tandy / Radio Shack] and
Atari-ST [Cumana UK]), it is one reason to override it -- somehow -- in
a consistently reliable way.

> The ports collection policy is that any port that
> specifies its own optimization flags by default and uses them in
> preference to ${CFLAGS} is a bug and must be fixed.

Well now you've made me go do research and type the l-o-n-g
response I didn't want to do.  ;)

Let's first deal with the notion that GCC has optimization bugs
per se -- in & of itself -- irregardless of the quality of the
source code and whether that code follows ISO standards.

Here are some quotes from the readily-available on-line books:


Chapter 2 of "FreeBSD Developers' Handbook":

| 2.4 Compiling with cc
|
|[...]
|
| -O
|Create an optimized version of the executable.  The compiler
|performs various clever tricks to try and produce an executable 
|that runs faster than normal.  You can add a number after the -O
|to specify a higher level of optimization, but this often exposes
|bugs in the compiler's optimizer.  For instance, the version of cc
|that comes with the 2.1.0 release of FreeBSD is known to produce
|bad code with the -O2 option in some circumstances.
|
|Optimization is usually only turned on when compiling a release
|version.
|[...]

HUH?!?  "the version of cc that comes with 2.1.0" has those -O bugs
Good grief, we're running 5.x (-Current, actually)!
I can't find any mention of any such bugs with GCC 3.x on i386.

Reading http://gcc.gnu.org/bugs.html for further info on optimization
bugs will lead one to believe higher likelyhood of incorrectly-written
source code over compiler bugs, yet GCC 3.x provides ways to steer
around such non-standard coding practices and still optimize it.


Chapter 7 of "FreeBSD Architecture Handbook" (on-line version):

| 7.6 Tuning the FreeBSD VM system
|
|[...]
|   By default, FreeBSD kernels are not optimized. You can set
|   debugging and optimization flags with the makeoptions directive in
|   the kernel configuration. Note that you should not use -g unless
|   you can accommodate the large (typically 7 MB+) kernels that result.
|makeoptions  DEBUG="-g"
|makeoptions  COPTFLAGS="-O -pipe"
|[...]

Precisely what I'm doing.

For fun, I build another version of my custom kernel with -O2 to see
how much of a difference can be 'felt' on this Puny Pentium2. ;)


Chapter 21 of "FreeBSD Handbook" (on-line version):

| 21.4.16.5.  How can I speed up making the world?
|
|[...]
|*  Also in /etc/make.conf, set CFLAGS to something like -O -pipe.
|   The optimization -O2 is much slower, and the optimization
|   difference between -O and -O2 is normally negligible.
|[...]

No mention of bugs there, either.  In fact the book is actually
recommending the use of -O.


After much more contemplation on this, I can see the need for
both circumstances:
(1) overriding a port's -O
as well as
(2) allowing a port's -O to override mine.

I'll be switching hats during the discussion below.

The only real bug is that I as a system admin may not be able
to override a port's inclusion of a -O parm because of where

Re: need help on CFLAGS in /etc/make.conf please

2004-02-13 Thread Kris Kennaway
On Thu, Feb 12, 2004 at 09:56:08PM -0600, Paul Seniura wrote:
> 
> Hi Kris,
> 
> > On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote:
> > > 
> > > Hi y'all,
> > > 
> > > I'm trying to find a way to do a CFLAGS+='-O' if and only if such a
> > > parm was not already provided before 'make' actually runs.
> > > 
> > > I had this coded with the single = sign, i.e. without ?= or +=, but
> > > the process still acts as if += was coded anyway, thus tacking on
> > > my -O *after* the port's own CFLAGS.
> > > 
> > > GCC33 docs say the _last_ -O# is the one that will be used.
> > > 
> > > I've seen other discussion on using -O2 but the point seems to be the
> > > ports that set -O2 explicitly are likely to work correctly.
> 
> On Thu 12 Feb 2004 17:13:25 -0800, Kris Kennaway replied:
> > That's not a good assumption; many ports simply add -O2 (or -O3, or
> > -O999) because the authors "want their code to run fast".  The set of
> > ports for which the authors have run full regression suites for all
> > supported versions of gcc and all supported OS and architecture
> > combinations is probably the null set.
> 
> Thank you for responding, but I'm *really* not wanting this to
> become another discussion on "how high my Oh-levels should be". ;)
> 
> My question for this discussion is specifically how to prevent
> overriding a port's own setting for that parm, and to provide a
> default setting -O[1] when the port does not set it at all?
> 
> (I'll save my l-o-n-g-e-r reply for later... believe me I have reasons ;)

There's no general way.  Some ports do ${CFLAGS} -O999, some do -O999
${CFLAGS}.  The ports collection policy is that any port that
specifies its own optimization flags by default and uses them in
preference to ${CFLAGS} is a bug and must be fixed.

Kris


pgp0.pgp
Description: PGP signature


Re: need help on CFLAGS in /etc/make.conf please

2004-02-13 Thread Paul Seniura

Hi Kris,

> On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote:
> > 
> > Hi y'all,
> > 
> > I'm trying to find a way to do a CFLAGS+='-O' if and only if such a
> > parm was not already provided before 'make' actually runs.
> > 
> > I had this coded with the single = sign, i.e. without ?= or +=, but
> > the process still acts as if += was coded anyway, thus tacking on
> > my -O *after* the port's own CFLAGS.
> > 
> > GCC33 docs say the _last_ -O# is the one that will be used.
> > 
> > I've seen other discussion on using -O2 but the point seems to be the
> > ports that set -O2 explicitly are likely to work correctly.

On Thu 12 Feb 2004 17:13:25 -0800, Kris Kennaway replied:
> That's not a good assumption; many ports simply add -O2 (or -O3, or
> -O999) because the authors "want their code to run fast".  The set of
> ports for which the authors have run full regression suites for all
> supported versions of gcc and all supported OS and architecture
> combinations is probably the null set.

Thank you for responding, but I'm *really* not wanting this to
become another discussion on "how high my Oh-levels should be". ;)

My question for this discussion is specifically how to prevent
overriding a port's own setting for that parm, and to provide a
default setting -O[1] when the port does not set it at all?

(I'll save my l-o-n-g-e-r reply for later... believe me I have reasons ;)

> Kris

  --  thx, Paul Seniura (in OkC)

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


Re: need help on CFLAGS in /etc/make.conf please

2004-02-13 Thread Kris Kennaway
On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote:
> 
> Hi y'all,
> 
> I'm trying to find a way to do a CFLAGS+='-O' if and only if such a
> parm was not already provided before 'make' actually runs.
> 
> I had this coded with the single = sign, i.e. without ?= or +=, but
> the process still acts as if += was coded anyway, thus tacking on
> my -O *after* the port's own CFLAGS.
> 
> GCC33 docs say the _last_ -O# is the one that will be used.
> 
> I've seen other discussion on using -O2 but the point seems to be the
> ports that set -O2 explicitly are likely to work correctly.

That's not a good assumption; many ports simply add -O2 (or -O3, or
-O999) because the authors "want their code to run fast".  The set of
ports for which the authors have run full regression suites for all
supported versions of gcc and all supported OS and architecture
combinations is probably the null set.

Kris


pgp0.pgp
Description: PGP signature


need help on CFLAGS in /etc/make.conf please

2004-02-13 Thread Paul Seniura

Hi y'all,

I'm trying to find a way to do a CFLAGS+='-O' if and only if such a
parm was not already provided before 'make' actually runs.

I had this coded with the single = sign, i.e. without ?= or +=, but
the process still acts as if += was coded anyway, thus tacking on
my -O *after* the port's own CFLAGS.

GCC33 docs say the _last_ -O# is the one that will be used.

I've seen other discussion on using -O2 but the point seems to be the
ports that set -O2 explicitly are likely to work correctly.

And so, in many ports esp. KDE, it will add my -O *after* the port's
own -O2, and KDE et al will not be compiled with the intended
settings, which may be causing some of its slowness.

Since TPTB here could only find a spare [EMAIL PROTECTED] Pentium2 for this
project, I'm trying to optimize other ports with at least -O in an
automatic fashion.  That leaves out /etc/pkgtools.conf due to the
sheer manual labor it would take to code this up for each port.

The idea of having a test in /etc/make.conf struck me as the way to
go, since it is effectively 'sourced'-in and could contain some simple
shell logic operations.

I hope I'm explaining this correctly.  ;)

I'd love to hear feedback on this.
I'll continue working on it tomorrow.

Thank you,

  --  Paul Seniura
  System Specialist
  State of Okla. D.O.T.

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


Re: New modem. Newbie need help.

2004-01-09 Thread Q
This particular card is a controllerless modem (ie. it is a winmodem),
and has no UART.

Seeya...Q

On Fri, 2004-01-09 at 21:33, Cristiano Deana wrote:
> Sorry for my basic knownledge about freebsd hacking and english language.
> 
> Problem: i need to use an internal PCI modem, 56k.
> I found USR (NO winmodem) pci 56k but it were not right detect by freebsd.
> 
> test# uname -rs
> FreeBSD 5.2-RC1
> 
> I add all his id in:
> src/sys/dev/puc/pucdata.c
> src/sys/dev/sio/sio_pci.c
> src/sys/dev/uart/uart_bus_pci.c
> copying and modifing existing similar USR modem pci.
> 
> Now it's detect as:
> [EMAIL PROTECTED]:20:0: class=0x078000 card=0x00c412b9 chip=0x100712b9 rev=0x00 
> hdr=0x00
> vendor   = '3COM Corp, Modem Division (Formerly US Robotics)'
> device   = 'ERL3263A-0 USR 56k Internal DF GWPCI PC99'
> class= simple comms
> 
> It has not a subclass UART, so i have not a cuaa*.
> 
> Any ideas?
> 
> Verbose dmesg:
> http://moto.bmm.it/dmesg
> 
> Thanks

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


New modem. Newbie need help.

2004-01-09 Thread Cristiano Deana
Sorry for my basic knownledge about freebsd hacking and english language.

Problem: i need to use an internal PCI modem, 56k.
I found USR (NO winmodem) pci 56k but it were not right detect by freebsd.

test# uname -rs
FreeBSD 5.2-RC1

I add all his id in:
src/sys/dev/puc/pucdata.c
src/sys/dev/sio/sio_pci.c
src/sys/dev/uart/uart_bus_pci.c
copying and modifing existing similar USR modem pci.

Now it's detect as:
[EMAIL PROTECTED]:20:0: class=0x078000 card=0x00c412b9 chip=0x100712b9 rev=0x00 
hdr=0x00
vendor   = '3COM Corp, Modem Division (Formerly US Robotics)'
device   = 'ERL3263A-0 USR 56k Internal DF GWPCI PC99'
class= simple comms

It has not a subclass UART, so i have not a cuaa*.

Any ideas?

Verbose dmesg:
http://moto.bmm.it/dmesg

Thanks

-- 
Cristiano Deana - FreeCRIS
"Ho iniziato a usare FreeBSD perche' m$ usava me. ed e' spiacevole"
in irc su: irc.azzurra.org #freebsd-it
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Adaptec 1210SA SATA RAID - need help

2004-01-07 Thread Clau
Hi,

I have this problem with an Adaptec 1210SA S-ATA RAID controller...
I want to install FreeBSD 5.1 but it doesn't work with the controller.
5.1 crashes in sysinstall, when probing for devices. I don't know exactly
why, but this happens even if the controller is out of the computer.
maybe because it doesn't find any hdd ?
ok, I got then 5.2RC2 boot floppies, and this doesn't crash, but still
it doesn't identify the raid controller, it see 2 hdd.
I installed the base system on one of them, and unfortunatly I cannot 
boot it.
Please help me with any suggestion.
I don't really care about the hardware raid, I only wish that i could 
install
and boot from one of the drives.
Will JBOD mode help me in any way ?

I am waiting for any suggestions...
If I can't solve this problem, I will be forced to use linux, or I will 
leave
another person taking care of the server, by installing windows :(

Thank you very much.

Claudiu Dragalina-Paraipan.
e-mail: [EMAIL PROTECTED]
---
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.
Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat
de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants.
Please be aware that there is a risk involved whenever opening e-mail attachments
to your computer and that MobiFon is not responsible for any damages caused by
viruses.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: I need help fixing the agp_nvidia.c driver

2003-11-02 Thread Doug Barton
On Tue, 2 Dec 2003, jason wrote:

> Hello everyone,
> I have a problem loading agp.  Every time I do load it at boot from
> rc.conf and do a startx the machine hard locks.

One definition of sanity is doing the same thing over and over, and
expecting a different result. :)  You should load it in
/boot/loader.conf[.local]:

agp_load="YES"

Actually, I do better with nvidia's driver without agp loaded, FWIW.

Doug

-- 

This .signature sanitized for your protection

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


I need help fixing the agp_nvidia.c driver

2003-11-02 Thread jason
Hello everyone,
   I have a problem loading agp.  Every time I do load it at boot from 
rc.conf and do a startx the machine hard locks.  So I decided to check 
the source code and maybe make some modifications.  I have an epox 8rda 
with the nforce 2 chipset, and a radeon 8500.  I am running 5.1.

   I noticed in the driver for my chipset(agp_nvidia.c) "wbc_mask" was 
coming up, and it was only in 1 driver, mine.  I checked for it in all 
related files and have found:
"#defineAGP_NVIDIA_1_WBC0xf0" in agpreg.h,
"#define PCIM_BRIO_MASK0xf" in pcireg.h. 

   Would anyone know if BRIO_MASK = Base Register In Out_MASK, and what 
does PCIM and WBC mean?  This is the first driver I have worked on or 
with and I am seeing allot of stuff that must be standard in linux(that 
is where agp_nvidia.c comes from) because it just does not look like 
other bsd code in the other agp drivers I have compared it too.  
Although I have also heard that the drivers nvidia writes for linux are 
pretty bad, I think they were referring to the style not the quality if 
I remember correctly.
Thanks,
Jason

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


Re: disklabal messed, need help!

2003-04-05 Thread Ruslan Ermilov
On Wed, Mar 26, 2003 at 01:03:03AM +0800, af asdf wrote:
> 
> Anyone knows how to repair disk when the freebsddisk lable is destroyed?
> 
> I have a 12G HD, the 1st partition is Windows NT, the second the for 
> FreeBSD. For some reason i installed a new disk label to it and newfs it a 
> bit. Once I found the newfs started, I have turned power off right away, 
> but the disk is bad now. anyone knows how to repair this?
> 
Yes.  Read the attached.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]   FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age
--- Begin Message ---
Hi!

I have my disk set in a so-called dangerously-dedicated mode,
and its disklabel looks like this:

8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a:  8388608   2621444.2BSD 1024  819216   # (Cyl.  260*- 8582*)
  b:   2621440  swap# (Cyl.0 - 260*)
  c: 199321920unused0 0 # (Cyl.0 - 19773)
  d: 11281440  86507524.2BSD 1024  819216   # (Cyl. 8582*- 19773*)

I recently upgraded the amount of RAM available on this machine
from 128M to 256M, and it took me a while to figure out why
swapon(8) no longer wants to enable swapping on `b' (which is
only 128M large).  I was pretty tired at the moment, and I thought
that maybe the problem is with the contents of my `b' partition,
so I did: dd if=/dev/zero of=/dev/ad0b bs=512 count=1000.  This
did not help, and eventually I recalled the fact of upgrading RAM,
and I've looked into some /sys/kern code to verify my guesses.
Nevertheless, I continued with my work on this machine, and compiled
and installed the new kernel (without any problems) on it.  Next
reboot refused to boot FreeBSD by mentioning that "No operating
system was found".  I wondered how I managed to screw my disk up.
It was too late in the night, so I delayed it until the next morning.
The night and next morning gave me the knowledge about what I did
wrong, and it surprised me a lot, as I never thought about it before.
The disklabel occupies the first sectors of the disk (or slice, if
you are under i386 and have your disk sliced).  My `b' partition
starts from the very first sector of my disk, so when I did the
dd(1) it overwrote the disklabel of my disk with zeroes.  Once
I understood and verified it, I recovered from this very fast.
I remembered that my swap partition was first and exactly 128M
large, so I skipped over this space, and saved some amount of
my `a' partition into a plain file.  Fortunately, file(1) is
smart enough to read the superblock and tell you about the
size of the filesystems.  This way I found the size of my
`a' partition and an offset for my `d' partition.  Hope this
technique could help someone in a similar situation.  Now the
question.  Where is the code in the kernel that prevents swapping
and/or writing to a disklabel portion of a physically first
partition on the disk?


Thanks,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]   FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age


pgp0.pgp
Description: PGP signature
--- End Message ---


pgp1.pgp
Description: PGP signature


disklabal messed, need help!

2003-03-25 Thread af asdf
Anyone knows how to repair disk when the freebsddisk lable is destroyed?

I have a 12G HD, the 1st partition is Windows NT, the second the for 
FreeBSD. For some reason i installed a new disk label to it and newfs it a 
bit. Once I found the newfs started, I have turned power off right away, 
but the disk is bad now. anyone knows how to repair this?

Best Regards

Eric





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

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


Re: I need help

2003-02-12 Thread rmkml
Sorry,
I posted an error on my program.
Regard.



Peter Jeremy wrote:

> On Tue, Feb 11, 2003 at 05:17:15PM +0100, rmkml wrote:
> >Im a process pb on freebsd47R,
> ...
> >gettimeofday(0x28126dec,0x0) = 0 (0x0)
> >gettimeofday(0x28126dec,0x0) = 0 (0x0)
> >accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
> >unavailable'
> ...
> >Could you help me ?
>
> You need to provide more background.  What is the process supposed to
> be doing?  What is the problem you are seeing?  ERR#35 just means that
> there is no outstanding TCP connect request.  I suspect there is a bug
> in your process but without knowing what it is supposed to do or what
> the code looks like, it's impossible to say more.
>
> If you this this is a bug in FreeBSD, please explain what it is doing
> wrong and post a short test case that shows the bug.
>
> Peter


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



Re: I need help

2003-02-11 Thread Peter Jeremy
On Tue, Feb 11, 2003 at 05:17:15PM +0100, rmkml wrote:
>Im a process pb on freebsd47R,
...
>gettimeofday(0x28126dec,0x0) = 0 (0x0)
>gettimeofday(0x28126dec,0x0) = 0 (0x0)
>accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
>unavailable'
...
>Could you help me ?

You need to provide more background.  What is the process supposed to
be doing?  What is the problem you are seeing?  ERR#35 just means that
there is no outstanding TCP connect request.  I suspect there is a bug
in your process but without knowing what it is supposed to do or what
the code looks like, it's impossible to say more.

If you this this is a bug in FreeBSD, please explain what it is doing
wrong and post a short test case that shows the bug.

Peter

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



I need help

2003-02-11 Thread rmkml
Hi,

Im a process pb on freebsd47R,

and I start truss over, I view :

...
gettimeofday(0x28126dec,0x0) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
unavailable'
gettimeofday(0x28126dec,0x0) = 0 (0x0)
poll(0x806d000,0x3,0x0)  = 0 (0x0)
poll(0x806d000,0x4,0x64) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
unavailable'
gettimeofday(0x28126dec,0x0) = 0 (0x0)
poll(0x806d000,0x3,0x0)  = 0 (0x0)
poll(0x806d000,0x4,0x64) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
unavailable'
gettimeofday(0x28126dec,0x0) = 0 (0x0)
poll(0x806d000,0x3,0x0)  = 0 (0x0)
poll(0x806d000,0x4,0x64) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
unavailable'
gettimeofday(0x28126dec,0x0) = 0 (0x0)
poll(0x806d000,0x3,0x0)  = 0 (0x0)
poll(0x806d000,0x4,0x64) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
gettimeofday(0x28126dec,0x0) = 0 (0x0)
accept(0x6,0xbfadcfa4,0xbfadcfa0)ERR#35 'Resource temporarily
unavailable'
gettimeofday(0x28126dec,0x0) = 0 (0x0)
poll(0x806d000,0x3,0x0)  = 0 (0x0)
...

sockstat :
USER COMMANDPID   FD PROTO  LOCAL ADDRESS FOREIGN ADDRESS
test   dipath  43716 tcp4   127.0.0.1:12345   *:*
test   dipath  43719 tcp4   127.0.0.1:12345   127.0.0.1:393
test   dipath  4371   10 tcp4   127.0.0.1:12345   127.0.0.1:433
test   dipath  4371   11 tcp4   127.0.0.1:12345   127.0.0.1:420

netstat -an :
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address  Foreign Address(state)
tcp4   0  0  127.0.0.1.12345127.0.0.1.433  CLOSE_WAIT
tcp4   0  0  127.0.0.1.12345127.0.0.1.420  CLOSE_WAIT
tcp4   0  0  127.0.0.1.12345127.0.0.1.393  CLOSE_WAIT
tcp4   0  0  127.0.0.1.12345*.*LISTEN

Top :
 PID USERNAME PRI NICE  SIZERES STATETIME   WCPUCPU COMMAND
 4371 test  2   0  2248K  1052K poll 0:14  0.00%  0.00% dipath

cat /proc/4371/map :
0x8048000  0x8057000  14 0  0xdd0b72a0 r-x 1 0 0x0 COW NC vnode
0x8057000  0x805b000   3 0  0xdd255c60 rw- 1 0 0x2180 COW NNC default
0x805b000  0x8087000  24 0  0xdd25df00 rwx 1 0 0x2180 COW NNC default
0x8087000  0x8089000   2 0  0xdd1f1ba0 rwx 1 0 0x2180 COW NNC default
0x8089000  0x808b000   1 0  0xdd20eba0 rwx 1 0 0x2180 COW NC default
0x28057000 0x28069000 16 0  0xc023a9c0 r-x 56 26 0x0 COW NC vnode
0x28069000 0x2806a000  1 0  0xdd1daae0 rw- 1 0 0x2180 COW NC vnode
0x2806a000 0x2806c000  2 0  0xdd143300 rw- 1 0 0x2180 COW NC default
0x2806c000 0x28074000  5 0  0xdd25dae0 rwx 1 0 0x2180 COW NC default
0x28074000 0x2808b000 19 19 0xdd0b97e0 r-x 2 1 0x0 COW NC vnode
0x2808b000 0x2808f000  3 0  0xdd25da20 rwx 1 0 0x2180 COW NC vnode
0x2808f000 0x28125000 91 0  0xdd0ca3c0 r-x 6 3 0x0 COW NC vnode
0x28125000 0x2812a000  5 0  0xdd25e8a0 rwx 1 0 0x2180 COW NNC vnode
0x2812a000 0x28143000 14 0  0xdd19e180 rwx 1 0 0x2180 COW NNC default
0x28143000 0x2814e000  6 0  0xc0238f20 r-x 13 4 0x0 COW NC vnode
0x2814e000 0x2815  2 0  0xdd145000 rwx 1 0 0x2180 COW NC vnode
0x2815 0x28157000  6 0  0xc0239100 r-x 28 12 0x0 COW NC vnode
0x28157000 0x28158000  1 0  0xdd1d97e0 rwx 1 0 0x2180 COW NC vnode
0x28158000 0x28169000  0 0  0 rwx 0 0 0x0 NCOW NNC none
0x28169000 0x2818  8 0  0xdd076a80 r-x 12 6 0x0 COW NC vnode
0x2818 0x28184000  3 0  0xdd1d8d80 rwx 1 0 0x2180 COW NC vnode
0x28184000 0x28185000  1 0  0xdd2ba4e0 rwx 1 0 0x2180 COW NNC default
0xbfa56000 0xbfa66000  3 0  0xdd25d000 rwx 1 0 0x2180 COW NC default
0xbfa67000 0xbfa77000  4 0  0xdd137c00 rwx 1 0 0x2180 COW NNC default
0xbfa78000 0xbfa88000  4 0  0xdd10f360 rwx 1 0 0x2180 COW NNC default
0xbfa89000 0xbfa99000  4 0  0xdd256360 rwx 1 0 0x2180 COW NNC default
0xbfa9a000 0xbfaaa000  4 0  0xdd19eae0 rwx 1 0 0x2180 COW NNC default
0xbfaab000 0xbfabb000  4 0  0xdd256ba0 rwx 1 0 0x2180 COW NNC default
0xbfabc000 0xbfacc000  4 0  0xdd255a20 rwx 1 0 0x2180 COW NNC default
0xbfacd000 0xbfadd000  1 0  0xdd154300 rwx 1 0 0x2180 COW NNC default
0xbfade000 0xbfaee000  1 0  0xdd25

Re: need help: ld final link failed. Memory exhausted

2002-04-23 Thread Martin Blapp


> Because 64MB of stack should be enough for anybody?

times have changed ... it seems. The OpenOffice build linking needs
definitly more that 64MB.

Martin


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



Re: need help: ld final link failed. Memory exhausted

2002-04-23 Thread Alfred Perlstein

* Martin Blapp <[EMAIL PROTECTED]> [020423 19:55] wrote:
> 
> Hi,
> 
> Setting the max stacksize to 128MB helped. Can we have this as
> default ?
> 
> As many users plan to use staroffice, requiring them to recompile
> kernel just for this would be ...
> 
> Anyway, is there a reason that the maxstack is 64MB only ?

Because 64MB of stack should be enough for anybody?

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

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



Re: need help: ld final link failed. Memory exhausted

2002-04-23 Thread Martin Blapp


Hi,

Setting the max stacksize to 128MB helped. Can we have this as
default ?

As many users plan to use staroffice, requiring them to recompile
kernel just for this would be ...

Anyway, is there a reason that the maxstack is 64MB only ?

Martin

Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
--
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--


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



need help: ld final link failed. Memory exhausted

2002-04-23 Thread Martin Blapp


Hi,

Now that I finally got the openoffice build running with the
stock gcc, the next problem appears.

# limits
Resource limits (current):
  cputime  infinity secs
  filesize infinity kb
  datasize   524288 kb
  stacksize   65536 kb
  coredumpsize infinity kb
  memoryuseinfinity kb
  memorylocked infinity kb
  maxprocesses 7390
  openfiles   14781
  sbsize   infinity bytes

But I get ...

/usr/libexec/elf/ld: final link failed: Memory exhausted
dmake:  Error code 1, while making '../unxfbsd.pro/lib/libsw641fi.so'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making
/usr/ports/editors/openoffice/work/oo_641d_src/sw/util
dmake:  Error code 1, while making 'build_all'
---* TG_SLO.MK *---
*** Error code 255

Stop in /usr/ports/editors/openoffice.

I wonder if

options  "MAXDSIZ='(1024 * 1024 * 1024)'"

may help in the kernel. Any ideas ?

Martin

Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
--
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--


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



Re: Need help!! Any FreeBSD users/hackers in Toronto??

2002-03-20 Thread Howard Feldman


Hi,

Mat has come in and set up the BSD machine for us, and it seems to be
working great!  Thanks for all the offers though.  If we have any more
questions, Ill know where to ask them ;)

Rayson Ho wrote:
> 
> Hi,
> 
> A lot of people replied, and seems like Mat can do the installation for
> you. Can you send an email to the freebsd hackers mailing-list
> ([EMAIL PROTECTED]) to tell people about the progress (if not people
> would think that we still need help).
> 
> Good luck with the installation,
> Rayson
> P.S. you don't need to subscribe to the list to send mail
> 
> --- Brian the Fist <[EMAIL PROTECTED]> wrote:
> > Matthew has offered to come by on Wednesday so hopefully that will be
> > sufficient ;)  thanks
> >
> > Rayson Ho wrote:
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/

-- 

Howard Feldman
Author of the Search for Freedom Computer Role-Playing Game
Visit its homepage at:  http://bioinfo.mshri.on.ca/people/feldman

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



Re: Need help accessing a chipset register

2002-03-19 Thread Doug White

On Tue, 19 Mar 2002, J. Seth Henry wrote:

> Hello,
> I have a particular need to read and write a single byte to a register on a
> VIA chipset. I have a feeling that this is probably a lot easier than it
> seems, but I haven't done anything like this before.
>
> I have a system with a VIA VT82C686 southbridge. Connected to several of its
> general purpose I/O lines are the LCD backlight control, and several LED's.
> There is a linux program available that will manipulate the register, but it
> fails to work under FreeBSD. The location in memory is EE4C. I can provide
> the original Linux code on request.

Is that in Memory space, or in I/O space? If it's I/O you can just
i386_set_ioperm() yourself the space then inb() and outb() it from
userland.

0xee4c would seem too low for a memory access point.

If it's not a separate function of the southbridge, then hooking it to a
driver would be tricky without some serious hackery to whatever driver is
grabbing that device/function.

Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED] |  www.FreeBSD.org


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



Need help accessing a chipset register

2002-03-19 Thread J. Seth Henry

Hello,
I have a particular need to read and write a single byte to a register on a 
VIA chipset. I have a feeling that this is probably a lot easier than it 
seems, but I haven't done anything like this before. 

I have a system with a VIA VT82C686 southbridge. Connected to several of its 
general purpose I/O lines are the LCD backlight control, and several LED's. 
There is a linux program available that will manipulate the register, but it 
fails to work under FreeBSD. The location in memory is EE4C. I can provide 
the original Linux code on request.

Could I impose on someone to help me write a program that will 
read/write/modify this one register? If there is a device in /dev that covers 
this part, I haven't found it - so I'm not sure if it will be as simple as 
calling ioctl. The chipset is detected, and appears as chip1@pci0 when I run 
pciconf. I tried looking at /dev/pci - but I didn't get very far.

I can handle the rest of the code, but accessing this register had proven to 
be a pain. Any help would be greatly appreciated. BTW - this is not for a 
commercial effort. I just want to get get FreeBSD running on this hardware 
for myself.

Also, I am on the freebsd-questions list, not this list. Could anyone 
replying please CC me? 

Thanks,

Seth Henry

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



Re: Need help!! Any FreeBSD users/hackers in Toronto??

2002-03-18 Thread Paul Halliday

umm..

I could prolly help. Let me know.

Paul H.
"Don't underestimate the power of stupid people in large groups"
___
http://dp.penix.org

On Sun, 17 Mar 2002, Rayson Ho wrote:

> Hi,
>
> The distributedfolding project (similar to SETI@home, it uses your free
> computer cycles to do something useful -- folding proteins) is planning
> to offer a FreeBSD client.
>
> However, they don't know how to setup a FreeBSD box. They are located
> in the Toronto area (Canada), so am I. But I don't have much FreeBSD
> experience. I installed a FreeBSD 4.3 box *without* networking support
> a while ago.
>
> Looks like there are some people planning to ship a FreeBSD box to
> them. However, I think the best would be having a person walking
> through the entire installation process, and answering questions
> related to FreeBSD.
>
> You can learn more about this project -- www.distributedfolding.org
>
> If no one is located in the Toronto area, then I will try my best to
> help. (I will find my 4.3 CD and do a clean reinstall on my own
> machine, and try to hook-up the Net -- but I know the help from you
> guys is always better)
>
> Thanks,
> Rayson
>
> P.S. The results from this project will be publicly available, and I am
> not directly related (employed) to this project.
>
>
>
> __
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
>
> 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



Need help!! Any FreeBSD users/hackers in Toronto??

2002-03-17 Thread Rayson Ho

Hi,

The distributedfolding project (similar to SETI@home, it uses your free
computer cycles to do something useful -- folding proteins) is planning
to offer a FreeBSD client.

However, they don't know how to setup a FreeBSD box. They are located
in the Toronto area (Canada), so am I. But I don't have much FreeBSD
experience. I installed a FreeBSD 4.3 box *without* networking support
a while ago.

Looks like there are some people planning to ship a FreeBSD box to
them. However, I think the best would be having a person walking
through the entire installation process, and answering questions
related to FreeBSD.

You can learn more about this project -- www.distributedfolding.org

If no one is located in the Toronto area, then I will try my best to
help. (I will find my 4.3 CD and do a clean reinstall on my own
machine, and try to hook-up the Net -- but I know the help from you
guys is always better)

Thanks,
Rayson

P.S. The results from this project will be publicly available, and I am
not directly related (employed) to this project.



__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

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



Need help with MII-bus driver

2002-03-17 Thread Martin Nilsson

Hello -hackers!

I'm trying to fix the problems in kern/30836 and kern/35691 where an 
integrated SIS 900  NIC is not working with an external Realtek PHY. 
(10baseT (or non NWAY) mode does not work)

I have modified the dev/mii/rlphy.c driver to also recognize the RTL8201 
PHY.

The problem is that in the rlphy_status function I need to know if this 
is a integrated 8139 phy or an external 8201 how can I find this out 
when all I have is a mii_softc* ?

Below are my changes that work fine with the SIS900 but breaks when 
using a Realtek 8139 and not doing NWAY negotiation.

Please cc me on any answers so I won't have to wait for my hackers 
digest to arrive.

/martin

*** rlphy.c Thu Mar  7 07:23:00 2002
--- rlphy.c.mn  Sun Mar 17 13:00:43 2002
***
*** 80,85 
--- 80,86 
   DRIVER_MODULE(rlphy, miibus, rlphy_driver, rlphy_devclass, 0, 0);

   int  rlphy_service __P((struct mii_softc *, struct mii_data *, int));
+ void  rlphy_status __P((struct mii_softc *));

   static int rlphy_probe(dev)
device_tdev;
***
*** 90,95 
--- 91,103 
ma = device_get_ivars(dev);
parent = device_get_parent(device_get_parent(dev));

+/* Realtek 8201L */
+   if (MII_OUI(ma->mii_id1, ma->mii_id2) == 0x20 &&
+   MII_MODEL(ma->mii_id2) == 0x20) {
+   device_set_desc(dev, "RealTek 8201(L) media interface");
+   return (0);
+   }
+
/*
 * RealTek PHY doesn't have vendor/device ID registers:
 * the rl driver fakes up a return value of all zeros.
***
*** 259,265 
}

/* Update the media status. */
!   ukphy_status(sc);

/* Callback if something changed. */
if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
--- 267,273 
}

/* Update the media status. */
!   rlphy_status(sc);

/* Callback if something changed. */
if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
***
*** 267,270 
--- 275,353 
sc->mii_active = mii->mii_media_active;
}
return (0);
+ }
+
+ void
+ rlphy_status(phy)
+   struct mii_softc *phy;
+ {
+   struct mii_data *mii = phy->mii_pdata;
+   int bmsr, bmcr, anlpar;
+
+   mii->mii_media_status = IFM_AVALID;
+   mii->mii_media_active = IFM_ETHER;
+
+   bmsr = PHY_READ(phy, MII_BMSR) | PHY_READ(phy, MII_BMSR);
+   if (bmsr & BMSR_LINK)
+   mii->mii_media_status |= IFM_ACTIVE;
+
+   bmcr = PHY_READ(phy, MII_BMCR);
+   if (bmcr & BMCR_ISO) {
+   mii->mii_media_active |= IFM_NONE;
+   mii->mii_media_status = 0;
+   return;
+   }
+
+   if (bmcr & BMCR_LOOP)
+   mii->mii_media_active |= IFM_LOOP;
+
+   if (bmcr & BMCR_AUTOEN) {
+   /*
+* NWay autonegotiation takes the highest-order common
+* bit of the ANAR and ANLPAR (i.e. best media advertised
+* both by us and our link partner).
+*/
+   if ((bmsr & BMSR_ACOMP) == 0) {
+
/* Erg, still trying, I guess... */
+
mii->mii_media_active |= IFM_NONE;
+
return;
+   }
+
+   if( anlpar = PHY_READ(phy, MII_ANAR) & PHY_READ(phy, MII_ANLPAR) ) {
+
if (anlpar & ANLPAR_T4)
+
mii->mii_media_active |= IFM_100_T4;
+
else if (anlpar & ANLPAR_TX_FD)
+
mii->mii_media_active |= IFM_100_TX|IFM_FDX;
+
else if (anlpar & ANLPAR_TX)
+
mii->mii_media_active |= IFM_100_TX;
+
else if (anlpar & ANLPAR_10_FD)
+
mii->mii_media_active |= IFM_10_T|IFM_FDX;
+
else if (anlpar & ANLPAR_10)
+
mii->mii_media_active |= IFM_10_T;
+
else
+
mii->mii_media_active |= IFM_NONE;
+
return;
+   }
+   /*
+* If the other side doesn't support NWAY, then the
+* best we can do is determine if we have a 10Mbps or
+* 100Mbps link. There's no way to know if the link
+* is full or half duplex, so we default to half duplex
+* and hope that the user is clever enough to manually
+* change the media settings if we're wrong.
+*/
+
+   /*
+* RTL8201 Link partner is not capable of autonegotiation.
+* Magic register (0x0019) found in Linux driver for SiS900
+*/
+   if( 1 /* Is this a 8201? */ ) {
+
if( PHY_READ(phy, 0x0019) & 0x01)
+
mii->mii_media_active |= IFM_100_TX;
+
else
+
mii->mii_media_active |= IFM_10_T;
+ 

if_wb driver problem - need help

2002-02-20 Thread Peter J. Blok

Hi,

I have a Winbond based card with an Altima AC104 media interface. No matter 
what I do i am not able to recognize the AC104 through the SIO interface. The 
BMSR  register value stays at zero. I have the datasheets of both the Winbond 
and the Altima and everything looks ok.

So far i see the frame to request the contents of the bmsr C24 is send ok to 
the AC10t thru the management interface. The ACK is never coming. Who has 
tips trying to make this thing work?

I have also tried NetBSD without success.

Peter

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



Re: Writing a packet alias translator, need help

2001-08-16 Thread Terry Lambert

Joe Clarke wrote:
> 
> I'm trying to write a packet alias translator for a protocol that uses TCP
> to setup a UDP streaming session (much like the smedia driver that's
> already there).  I'm having a problem getting the translated port to mesh
> with the actual port.  Here's what I've done:
> 
> /* msg is a TCP setup packet
>  struct msg {
> u_int32_t ipAddr;
> u_int32_t portNumber;
>  };
> */

One obvious thing is that ports are 16 bits, not 32 but...

> is UDP 16704, but the translation puts 50535 in the packet.

The bit patterns these make are not even remotely similar,
meaning that this isn't a byte order issue; I think you will
need to run the code in a debugger (or add printf's).

-- Terry

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



Writing a packet alias translator, need help

2001-08-13 Thread Joe Clarke

I'm trying to write a packet alias translator for a protocol that uses TCP
to setup a UDP streaming session (much like the smedia driver that's
already there).  I'm having a problem getting the translated port to mesh
with the actual port.  Here's what I've done:

/* msg is a TCP setup packet
 struct msg {
u_int32_t ipAddr;
u_int32_t portNumber;
 };
*/
null_addr.s_addr = 0;
msg->ipAddr = (u_int32_t)GetAliasAddress(link).s_addr;
my_link = FindUdpTcpOut(pip->ip_src, null_addr,
msg->portNumber, 0, IPPROTO_UDP, 1);
msg->portNumber = (u_int32_t)GetAliasPort(my_link);

What happens is that the IP address gets handled correctly, but not the
port number.  The translation occurs in the packet, but it doesn't get
translated to the correct number.  For example, the actual port being used
is UDP 16704, but the translation puts 50535 in the packet.

I guess my question is how can I put the correct port number in the TCP
setup packet?  How can I then use this port number in the upcoming UDP
stream?

I've never written a NAT translator before, so I'm not sure if
FindUdpTcpOut() does what I think.  any help would be appreciated.

Joe Clarke


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



Re: need help

2001-08-10 Thread Terry Lambert

smail wrote:
> 
> Hello freebsd-hackers,
> 
> i need some help. my problem is about memory limit in mmap function.
> i can't mmap files infinitely, after some number of file mmaped in
> memory i've got an error, probably causing memory limit of 2 or 4 Gb.
> can you help me? my platform is FreeBSD 4.3/i386 [128Mb RAM, 4Gb
> swap].

This is probably your homework, isn't it?  8-)


Your address space is by default limited to 3G (the kernel virtual
address space is 1G and the user address space is 3G: the kernel
needs to be able to get at all memory.

You can change this a little, but you will still bump your head
on the limiting fact that you have only 32 bits with which to
address all the memory you use.

To exceed this limit, you will have to go to indirect mappings;
using indirect mappings, you divide your address space up into
chunks, and then when you need to access an additional chunk of
data, and all your chuncks are busy, you evict a previous mapping
and map the chunk there instead.  A common algorithm for this
type of eviction is LRU.

Effectively, you are managing the mapping to implement in software
a virtual address space in excess of your 3G limit; in effect,
there is no practical limit on the amount of data you can access
in this way, since you could go to eviction of your table of ranges,
after going to a hierarchy of tables of ranges of file data that
you map.

A simple example of this technique would be to map a smaller
portion of the file (say 8MB of the file) at a time, and keep a
quad word (C type "long long", FreeBSD type "off_t") of the offset.
To access the first 8MB of the file, mmap it in memory, and iterate
through it.  Now iterate through 8GB of the file by moving the
mapping, only when necessary.

This technique is known as "windowing"; here is a simple example,
which won't compile without header files, probably needs "LL"
constant identifiers to make them 64 bits, and may have a typo
even after you add the header files; it will also be incredibly
slow, since the algorithm parameters should be tuned to the data
you will be accessing:

/* I call this program "How much is that file in the window?"*/

void *basep;/* window address*/
off_t relbase;  /* window base*/
off_t eight_meg = 0x008;/* window size*/
int memfd;  /* lazy global*/


/*
 * Stupid program to dump out the first 8G of a file, one
 * byte at a time, using a windowed "get byte" function.
 */
main()
{
off_t curoff;
unsigned char c;

memfd = open( "my_overly_large_file", O_RDONLY, 0);

/* Go from 0 to 8G, one byte at a time...*/
for( curoff = 0; curoff < 0x0001; curoff++) {
c = byte_at_offset( curoff);
putchar(c);
}
}

/*
 * Access a character in an arbitrary length file by mapping
 * it into memory in 8M windows, changing the mapping when
 * the requested character lands before or after the current
 * window, so that a lot of mapping and unmapping isn't needed.
 */
unsigned char
byte_at_offset(off_t offset)
{
off_t reloffset = offset - relbase;

/*
 * if the offset is before, or after the window, or
 * if we haven't yet set up a window, then we need to
 * modify the window we are using.
 */
if( relbase > offset || reloffset > eight_meg || basep == NULL) {
/* if this is the first time, there is nothing to unmap*/
if( basep != NULL) {
munmap( basep, eight_meg);
}
/* get a new relative base, offset, and a new window*/
relbase = offset - (offset % eight_meg);
reloffset = offest - relbase;
basep = mmap( NULL, eight_meg, PROT_READ, MAP_SHARED,
  memfd, relbase;
}

/*
 * return the requested character from its relative
 * location in the window.
 */
return *(unsigned char *)&basep[ reloffset];
}


-- Terry

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



Re: mmap limits (was: need help)

2001-08-10 Thread Alexey Zakirov

On Fri, 10 Aug 2001, Greg Lehey wrote:

> > i can't mmap files infinitely, after some number of file mmaped in
> > memory i've got an error, probably causing memory limit of 2 or 4 Gb.
> > can you help me? my platform is FreeBSD 4.3/i386 [128Mb RAM, 4Gb
> > swap].
>
> You'll get more replies with an appropriate subject and some more
> details.

probably he says about http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18209.

*** WBR, Alexey Zakirov ([EMAIL PROTECTED])



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



mmap limits (was: need help)

2001-08-09 Thread Greg Lehey

On Wednesday,  1 August 2001 at  0:17:42 +0700, smail wrote:
> Hello freebsd-hackers,
>
> i need some help. my problem is about memory limit in mmap function.
> i can't mmap files infinitely, after some number of file mmaped in
> memory i've got an error, probably causing memory limit of 2 or 4 Gb.
> can you help me? my platform is FreeBSD 4.3/i386 [128Mb RAM, 4Gb
> swap].

You'll get more replies with an appropriate subject and some more
details.

Greg
--
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



need help

2001-08-09 Thread smail

Hello freebsd-hackers,

i need some help. my problem is about memory limit in mmap function.
i can't mmap files infinitely, after some number of file mmaped in
memory i've got an error, probably causing memory limit of 2 or 4 Gb.
can you help me? my platform is FreeBSD 4.3/i386 [128Mb RAM, 4Gb
swap].
  

-- 
with best regards,
 smail mailto:[EMAIL PROTECTED]



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



now OK, was - need help: gdb -k 4.16/7

2001-07-15 Thread Dorr H. Clark


Some time ago, I wrote:

> I am experimenting with porting an application
> from the FreeBSD 2.2.x series to a more modern release,
> and as such I have occaision to debug kernel core files
> under the old release using the gdb -k option
> (saved via savecore).  The problem is the old kernel 
> has been customized with a different load address 
> (new style 0xC000 vs. old style 0xF000). 
> ... The problem is the resulting gdb -k sessions 
> are not fully functional...

80% of all problems that appear to be OS problems
are really application problems.  This was one of them.

It turns out that there were more changes than just
the load address, the application malloc() calls in 
the custom kernel had also been changed from 512, 
1k, & 2k (sub-page fragments) to full page allocations 
(actually multi-page). 

As you may know, FreeBSD malloc()s of sub-page fragments
in the kernel are permanent, when they are freed
they are put on queues according to size buckets.
In contrast, freeing multiple whole pages truly
frees the pages, including unmapping!  So when the
kernel went down, the at_shutdown() call was freeing
all the memory, and unmapping it.  This side effect
was never noticed in the old system, the debugging
of cores was actually relying on the stale mapping
of freed memory (I didn't do this code myself,
so I didn't catch it before).

The fix was only to free() in in the at_shutdown() 
call IF a normal shutdown is in progress 
(i.e.- not a panic, page_fault, etc.).

I just wanted to share the absolution of the product
for the permanent record.  The custom FreeBSD kernel 
is doing the Right Thing (tm), gdb is doing the Right 
Thing (tm), savecore and wddump() are doing the Right
Thing (tm), and when the application code is doing 
the right thing the cores are completely debuggable. 

Thanks for the previous responses, 
it was helpful in straightening this bug out,

-Dorr H. Clark
Santa Clara University


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



Re: need help: gdb -k 4.16/7

2001-06-06 Thread David O'Brien

On Wed, Jun 06, 2001 at 10:32:39AM -0700, Dorr H. Clark wrote:
> Interestingly, the 4.16 distribution archived at ftp://www.gnu.org
> does not exactly match the version in the FreeBSD 2.2.x release,
> and doesn't build cleanly either.

Not sure why you find this so surprising.  Install the 2.2.x sources and
you will have the gdb sources that built the original gdb.  If you want
to update that to 4.17 or higher, use CVS to find the changes from the
vendor branch and you will then have our modifications.  Alternately, you
could get the RCS files for 2.2.x's GDB and do a vendor import of 4.17
and fix the merge conflicts.

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



need help: gdb -k 4.16/7

2001-06-06 Thread Dorr H. Clark


Hi-

< Please cc: me on any answer as I am not subscribed! Thx! >
< Also, if this is the wrong list please redirect me! Thx! >

I am experimenting with porting an application
from the FreeBSD 2.2.x series to a more modern release,
and as such I have occaision to debug kernel core files
under the old release using the gdb -k option
(saved via savecore).

The problem is the old kernel has been customized
with a different load address (new style 0xC000 
vs. old style 0xF000).  This change involves 
updating the include file environment.  I have made
those changes coherent between the kernel build tree
and /usr/include, then rebuilt gdb.  The problem
is the resulting gdb -k sessions are not fully 
functional.

I would like to know if anyone knows anything about this
& can help me with some clues.

Specifically, the kernel stack frames are fine,
sources are fine, data/bss access is fine, 
but attempts to access kernel malloc'ed memory fail.
The debugger reports that the address is not accessible.

The implementation of gdb -k in 4.16 uses a file 
kvm-fbsd.c which mimics a real kvm access by reading
from the core file instead.  My understanding is the core
file is a physical image of memory, so this kvm emulation
has some knowledge of the virtual memory system.
I am worried that there are some hidden dependencies
on the original memory layout that were not handled
when the KERNBASE move was reflected in the include files.

After debugging this for some time, in desperation
I attempted to port 4.17 and 4.18 back into the old
FreeBSD environment, hoping to find a bug fix.
What I got instead was a build failure in 4.17:

< gdb 4.17 build log excerpt > 
Graph cycles through config.h

`all' not remade because of errors.
make all-recursive
Making all in doc
rm -f gdb
gcc -g -O2  -o gdb  init.o version.o blockframe.o breakpoint.o findvar.o stack.o 
thread.o  source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o  symtab.o 
symfile.o symmisc.o infcmd.o infrun.o command.o  expprint.o environ.o gdbtypes.o 
copying.o i386-tdep.o i387-tdep.o solib.o ser-tcp.o ser-unix.o fork-child.o 
infptrace.o inftarg.o corelow.o core-aout.o i386b-nat.o  remote.o dcache.o 
remote-utils.o tracepoint.o   mem-break.o target.o parse.o language.o c-exp.tab.o 
jv-exp.tab.o f-exp.tab.o m2-exp.tab.o buildsym.o  exec.o bcache.o objfiles.o minsyms.o 
maint.o demangle.o  dbxread.o coffread.o elfread.o  dwarfread.o dwarf2read.o 
mipsread.o stabsread.o corefile.o  c-lang.o ch-exp.o ch-lang.o f-lang.o  jv-lang.o 
jv-valprint.o jv-typeprint.o m2-lang.o  scm-exp.o scm-lang.o scm-valprint.o 
complaints.o typeprint.o  c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o  
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o  nlmread.o 
serial.o mdebugread.o os9kread.o top.o utils.o annotate.o main.o inflow.o gnu-regex.o  
   ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a 
../libiberty/libiberty.a  -ltermcap-lm../libiberty/libiberty.a  
gcc: ../libiberty/libiberty.a: No such file or directory
gcc: ../libiberty/libiberty.a: No such file or directory
*** Error code 1

Stop.

< end gdb 4.17 build log excerpt > 

The 4.18 baseline built fine, but gdb -k is no longer supported!

Interestingly, the 4.16 distribution archived at ftp://www.gnu.org
does not exactly match the version in the FreeBSD 2.2.x release,
and doesn't build cleanly either.  The build error from 4.16 
is here:

< gdb 4.16 build log excerpt > 

if [ -n "" ]; then  gcc -O2 -c  -DTRAD_CORE   -I. -I. -I./../include  -g trad-core.c 
-o pic/trad-core.o;  else true; fi
gcc -O2 -c -DTRAD_CORE   -I. -I. -I./../include  -g trad-core.c
trad-core.c: In function `trad_unix_core_file_p':
trad-core.c:108: `NBPG' undeclared (first use this function)
trad-core.c:108: (Each undeclared identifier is reported only once
trad-core.c:108: for each function it appears in.)
*** Error code 1

Stop.

< end gdb 4.16 build log excerpt > 

Anyone who has any clues as to how to overcome any
of these problems, and properly access the old kernel
core files using any of the 4.16, 4.17, or 4.18 baselines,
please email.

Thanks,

-Dorr H. Clark

School of Engineering
Santa Clara University




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



need help: mmap() / vm_map_stack()

2001-03-02 Thread E.B. Dreger

Greetings,

This is something of a repost of an earlier question, but in a different
vein.  I should mention that I'm using 4.2-R.

Has anyone modified vm_map_stack(), in /usr/src/sys/vm/vm_map.c, to search
for the first suitable open block?

I tried modifying vm_map_stack() based on vm_map_find(), but get:

* kernel panic upon boot ("Bad entry start/end for new stack entry")
* kernel panic when attempting to search for a block using mmap(MAP_STACK)
* _duplicate_ values returned when searching using mmap(MAP_STACK)

depending upon the exact code that I tried.  I know that the first two
symptoms are when I made a fubar vm_map_stack().  I'm rather new to the
kernel code, so I'm sure that I'm doing something wrong...

For the last problem, I made certain that I had vm_map_lock()'ed, ran at
splvm()... same thing.  I then sleep()'ed between mmap() calls... same
thing.

I've concluded that I need to learn more about vm_map_entry_t and friends,
but wanted to see if anyone had any suggestions before I went chasing the
wrong thing...

I'm almost tempted to try having vm_map_stack() call vm_map_find() with
size SGROWSIZ, shrink it to the initial size, then alter vm_map_entry_t
entries as needed based upon current vm_map_stack() code.

Advice?  Just keep digging? :-)


Eddy

---

Brotsman & Dreger, Inc.
EverQuick Internet / EternalCommerce Division

E-Mail: [EMAIL PROTECTED]
Phone: (316) 794-8922

---


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



Re: NEED HELP: fiber card

2001-02-02 Thread Matthew N. Dodd

On Fri, 2 Feb 2001 [EMAIL PROTECTED] wrote:
> I'm afraid a DEFPA is really != a 3COM. DEFPA is a DEC design, which
> I think uses DEC-specific chips
> 
> My DEFPAs are at home so I cannot easily check right now.

I'm aware of 1 3com card that is a rebadged DEFPA.

Others appear to have similar/same components but are configured
differently.

I've compared a few side by side but never gotten around to trying to make
the fea/fpa drivers work with them.

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



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



Re: NEED HELP: fiber card

2001-02-01 Thread wkb

I'm afraid a DEFPA is really != a 3COM. DEFPA is a DEC design, which
I think uses DEC-specific chips

My DEFPAs are at home so I cannot easily check right now.

W/


> On Thu, 1 Feb 2001, Nick Meverden wrote:
> > has anyone had any success getting the FDDILINK 3com 3c805 pci fiber
> > card to work with freebsd 4.2R or know anyone that could help develop
> > a driver for this ?  Please contact me
> 
> If this isn't a DEFPA in disguise and adding the PCI IDs to the fpa driver
> doesn't work then you're pretty much out of luck.
> 
> -- 
> | Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
> | [EMAIL PROTECTED] |   2 x '84 Volvo 245DL| ix86,sparc,pmax |
> | http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |
> 
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message




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



Re: NEED HELP: fiber card

2001-02-01 Thread Matthew N. Dodd

On Thu, 1 Feb 2001, Nick Meverden wrote:
> has anyone had any success getting the FDDILINK 3com 3c805 pci fiber
> card to work with freebsd 4.2R or know anyone that could help develop
> a driver for this ?  Please contact me

If this isn't a DEFPA in disguise and adding the PCI IDs to the fpa driver
doesn't work then you're pretty much out of luck.

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



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



NEED HELP: fiber card

2001-02-01 Thread Nick Meverden

has anyone had any success getting the FDDILINK 3com 3c805 pci fiber card to
work with freebsd 4.2R   or know anyone that could help develop a driver for
this ?  Please contact me 


[EMAIL PROTECTED]   
Nick Meverden


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



Re: Need help - emergency!

2001-01-27 Thread Alexander Hausner

on Sat, 27 Jan 2001 Felix-Antoine Paradis wrote:
>It says the filesystem
>is read-only. Can you help us?

mount -uw / 

should help.

Alex
-- 
Email: Alexander Hausner <[EMAIL PROTECTED]>
NIC-HDL: AH194-RIPE
PGP Key ID: 1024/D272F9B5
PGP Key fingerprint: 45 CB 7A 6A 24 81 71 14  CE 11 27 53 36 63 AD 1C
PGP Public-Key: https://www.luga.or.at/pgppubkeys/D272F9B5.asc


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



Re: Need help - emergency!

2001-01-27 Thread Matthew Jacob



Wrong list to send this too... it should either be -stable or -current- you
didn't say which system it was.

try 

mount /

or

mount -w /


On Sat, 27 Jan 2001, Felix-Antoine Paradis wrote:

> -BEGIN PGP SIGNED MESSAGE-
> 
> Hey
>We got a problem booting our server. Someone added some ips with
> x.x.x.y y=>255 and it's not booting. We rebooted in single-user mode and
> we're not able to make any changes to the rc.conf. It says the filesystem
> is read-only. Can you help us?
> 
> Thank's!
> 
> . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .
> .   Felix-Antoine Paradis.  cell:1-418-261-0865  .
> .  IRC:   reel @ DALnet  .  job:Idemnia Network  .
> .  Email: [EMAIL PROTECTED]  .  *** www.FreeBSD.org ***  .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .
> ."The power of man has grown in every sphere, except .
> . over himself"  .
> .--Sir Winston Churchill .
> . . . . . . . . . . . . . . . . . . . . . . . . . . . .  .
> 
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: 2.6.3ia
> Charset: noconv
> 
> iQCVAwUBOnML+hcIKY4ZDBRpAQEwbQQAhTjr/IkEP4qEZy9H8/FD5y4PTVwLO4dy
> zjQv67KBxHX4lN+a65xmnHOjMT0wJ59t8J5lq91Q850o1iOpM1OB3MDDGnhLg1CG
> mDC/NCrCRY/GpVkn7NTeKlWGgWstEe3di14PPNY8kYNtx0Av2/GvY2e7d7NtIrCi
> R2szPwR9qiI=
> =mHax
> -END PGP SIGNATURE-
> 
> 
> 
> 
> 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



Need help - emergency!

2001-01-27 Thread Felix-Antoine Paradis

-BEGIN PGP SIGNED MESSAGE-

Hey
   We got a problem booting our server. Someone added some ips with
x.x.x.y y=>255 and it's not booting. We rebooted in single-user mode and
we're not able to make any changes to the rc.conf. It says the filesystem
is read-only. Can you help us?

Thank's!

. . . . . . . . . . . . . . . . . . . . . . . . . . . .  .
.   Felix-Antoine Paradis.  cell:1-418-261-0865  .
.  IRC:   reel @ DALnet  .  job:Idemnia Network  .
.  Email: [EMAIL PROTECTED]  .  *** www.FreeBSD.org ***  .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .  .
."The power of man has grown in every sphere, except .
. over himself"  .
.--Sir Winston Churchill .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .  .



-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv

iQCVAwUBOnML+hcIKY4ZDBRpAQEwbQQAhTjr/IkEP4qEZy9H8/FD5y4PTVwLO4dy
zjQv67KBxHX4lN+a65xmnHOjMT0wJ59t8J5lq91Q850o1iOpM1OB3MDDGnhLg1CG
mDC/NCrCRY/GpVkn7NTeKlWGgWstEe3di14PPNY8kYNtx0Av2/GvY2e7d7NtIrCi
R2szPwR9qiI=
=mHax
-END PGP SIGNATURE-




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



Re: need help with pthreads and memory corruption problem

2001-01-23 Thread Max Khon

hi, there!

On Tue, 23 Jan 2001, Joe Albowicz wrote:

> I'm porting an application from Linux to FreeBSD and I am having some
> problems with the program crashing in weird/random places because of
> memory corruption.  For example the crash can happen in STL or free or in
> c++ code that we have written (note that our code works just fine on Linux
> for extended periods of time under heavy load).
> 
> The application consists of a main process plus a few dozen pthreads
> written in c++. The only changes that I have made in porting from Linux to
> FreeBSD consisted of Makefile changes (e.g. using -D_THREAD_SAFE) and I
> replaced "new" with malloc in code that is excuted by the pthreads [except
> STL may call new?].  Replacing new with malloc definately helped, but I'm
> not sure why.

[...]

> FreeBSD 4.2-RELEASE FreeBSD 4.2-RELEASE #0

please upgrade to latest -stable.
there have been problems with C++ and threads in 4.2-RELEASE
and they have been fixed recently

/fjoe



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



Re: need help with pthreads and memory corruption problem

2001-01-23 Thread Alfred Perlstein

* Joe Albowicz <[EMAIL PROTECTED]> [010123 21:38] wrote:
> 
> Hello, 
> 
> I'm porting an application from Linux to FreeBSD and I am having some
> problems with the program crashing in weird/random places because of
> memory corruption.  For example the crash can happen in STL or free or in
> c++ code that we have written (note that our code works just fine on Linux
> for extended periods of time under heavy load).

Try updating to the most recent version of FreeBSD-stable.  Afaik there
were bugs with c++ and threads until several weeks ago.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


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



  1   2   >