Re: FreeBSD Memory Management questions ?

2005-06-20 Thread Aziz Kezzou
On 6/20/05, John Baldwin [EMAIL PROTECTED] wrote: On Sunday 19 June 2005 10:49 pm, Aziz Kezzou wrote: On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: 1 - Right now to access the memory address space of a user process from kernel mode, I only have to set, on x86 systems

Re: FreeBSD Memory Management questions ?

2005-06-19 Thread Aziz Kezzou
On Tue, Jun 14, 2005 at 04:21:41AM -0400, Aziz Kezzou wrote: 1 - Right now to access the memory address space of a user process from kernel mode, I only have to set, on x86 systems, the register CR3 to the right value. How can I do that on other architectures ? is there an architecture

How to check root powers on a struct proc ?

2005-06-17 Thread Aziz Kezzou
Hi all, I am trying to check that a process (struct proc) has root powers when it calls my KLD system call. I know from kern_jail.c that I can use suser() but this function takes a struct thread* instead of struct proc* although the credentials (struct ucred *p_ucred;) are stored in proc ! Is

Re: How to check root powers on a struct proc ?

2005-06-17 Thread Aziz Kezzou
Aziz Kezzou wrote: Hi all, I am trying to check that a process (struct proc) has root powers when it calls my KLD system call. I know from kern_jail.c that I can use suser() but this function takes a struct thread* instead of struct proc* although the credentials (struct ucred

FreeBSD Memory Management questions ?

2005-06-14 Thread Aziz Kezzou
Hi all, I have two questions concerning FreeBSD Memory management : 1 - Right now to access the memory address space of a user process from kernel mode, I only have to set, on x86 systems, the register CR3 to the right value. How can I do that on other architectures ? is there an

How to do a routing lookup inside the kernel in FreeBSD ?

2005-06-09 Thread Aziz Kezzou
Hi all, I am trying to figure out from the kernel source code (FreeBSD 5.3) how can I perform a routing lookup in a KLD module. Since I am short in time, if anyone knows how do to do this I would appreciate. Any pointers to the right portion of the code are also apperciated. Thanks, -aziz

Re: Fork mystries....

2005-06-04 Thread Aziz Kezzou
At 07:55 PM 6/3/2005 -0400, Aziz Kezzou wrote: | Hi all, | It's probably not the right mailing list to ask but I am really | surprised about global variable sharing in a multithreaded C | application. If I remember well my multithreading course global | variables are shared between threads

Fork mystries....

2005-06-03 Thread Aziz Kezzou
Hi all, It's probably not the right mailing list to ask but I am really surprised about global variable sharing in a multithreaded C application. If I remember well my multithreading course global variables are shared between threads, right ? Example : int counter =

Routing loop + raw IP packets : looking for clues ...

2005-05-31 Thread Aziz Kezzou
Hi all, For the purpose of my project I am simpulating a 3-hop network with QEMU on my workstation, as follows : |-| |---| |-| |Daemon1(user process)|---tun0---| Daemon 2 on

Pseudo-device driver select ??

2005-05-26 Thread Aziz Kezzou
Hi all, I am trying to implement a small kld pseudo-device driver on FreeBSD 5.3 that behaves just like a socket with regards to the select system call. Currently, I am using the sample echo pseudo-device driver from

Re: Pseudo-device driver select ??

2005-05-26 Thread Aziz Kezzou
Aziz Kezzou wrote: Hi all, I am trying to implement a small kld pseudo-device driver on FreeBSD 5.3 that behaves just like a socket with regards to the select system call. Currently, I am using the sample echo pseudo-device driver from http://www.freebsd.org/doc/en_US.ISO8859-1

Re: Pseudo-device driver select ??

2005-05-26 Thread Aziz Kezzou
Aziz Kezzou wrote: Hi all, I am trying to implement a small kld pseudo-device driver on FreeBSD 5.3 that behaves just like a socket with regards to the select system call. Currently, I am using the sample echo pseudo-device driver from http://www.freebsd.org/doc

weird NFS problem ?

2005-05-25 Thread Aziz Kezzou
Hi all, I am experiencing a weird problem while mounting nfs files. Configuration : - NFS client : FreeBSD 5.3 running on QEMU, IP = 192.168.0.2 - NFS server : FC3, the host, IP = 192.168.0.1 Firewalling: absolutely everything is authorized from 192.168.0.2 on 192.168.0.1 Problem : some UDP

Re: KLD module with C++ iostreams ?

2005-04-21 Thread Aziz KEZZOU
a special effort to get C++ support into linux. Dave On 4/20/05, Aziz KEZZOU [EMAIL PROTECTED] wrote: Hi hackers, I am wondering if I can use c++ iostreams inside the kernel ? After all the code : cout Hello world! endl; ends accessing the stdout just like : printf(Hello world!\n); right

KLD module with C++ iostreams ?

2005-04-20 Thread Aziz KEZZOU
Hi hackers, I am wondering if I can use c++ iostreams inside the kernel ? After all the code : cout Hello world! endl; ends accessing the stdout just like : printf(Hello world!\n); right ? So if I could compile my KLD module with static linkage to libstdc++, that should be ok, right ? Any one

clear/set/test_bit header ??

2005-04-13 Thread Aziz KEZZOU
Hi hackers, I am trying to port a software from Linux to FreeBSD (5.3). But, I can't find the equivalent header in FreeBSD of asm/bitops.h in Linux ? Here are the prototypes of the functions I am using: int clear_bit(int offset, int * flag); int set_bit(int offset, int * flag); int test_bit(int

Re: running freebsd in qemu using the -nographic option ?

2005-03-24 Thread Aziz KEZZOU
Aziz KEZZOU wrote: Hi all, I am running freebsd 5.3 under qemu (a fast IA32 emulator). My host system is linux. Everything works fine, but I want to get rid of this small non-scrollable window, not practical when gcc says I made many many errors :-)... you can scroll it after

running freebsd in qemu using the -nographic option ?

2005-03-23 Thread Aziz KEZZOU
Hi all, I am running freebsd 5.3 under qemu (a fast IA32 emulator). My host system is linux. Everything works fine, but I want to get rid of this small non-scrollable window, not practical when gcc says I made many many errors :-)... Instead I want to get a console. In qemu's documentation it

How to send a signal from inside the kernel?

2005-03-17 Thread Aziz KEZZOU
Hi all, I would like to send a signal (e.g SIGUSR1) to a user process from inside the kernel (kld module). Can any one tell me how to do it ? I tried the following code inspired from sys/kern/kern_sig.c : == #include sys/types.h #include

Re: How to send a signal from inside the kernel?

2005-03-17 Thread Aziz KEZZOU
Aziz KEZZOU wrote this message on Thu, Mar 17, 2005 at 12:34 -0500: Hi all, I would like to send a signal (e.g SIGUSR1) to a user process from inside the kernel (kld module). Can any one tell me how to do it ? I tried the following code inspired from sys/kern/kern_sig.c

generic network protocols parser ?

2005-03-04 Thread Aziz KEZZOU
Hi all, I am wondering if any one knows about a generic parser which takes a packet (mbuf) of a certain protocol (e.g RSVP ) as input and generates some data structre representing the packet ? I've been searching for a while and found that ethereal and tcpdump for example use specific data

intercepting RSVP packets with netgraph

2005-02-27 Thread Aziz KEZZOU
in advance. Aziz Kezzou ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

RE: Sharing data between user space and kernel

2005-02-25 Thread Aziz KEZZOU
sleeping(). What you probably want to do is actually allocate wired kernel pages and export them to userspace. Take a look at the GEOM gstat(8) implementation, which does exactly that. However, you have to make sure that if you ever decide to reuse that kernel memory for something else (i.e.,