Re: How does not practice freebsd kernel programming?

2007-03-12 Thread Alexander N. Mueller
> What is the best way to start practicing kernel programming on freebsd for > amateurs. I have found many sites about Linux kernel programming but none > for FReebsd kernel programming. > What are the usual steps followed while learning freebsd kernel > programming? Maybe you sho

Re: How does not practice freebsd kernel programming?

2007-03-12 Thread Michael M. Press
You can play with adding system calls to FreeBSD. This is not something that people need to do very often, but it is a good way to give yourself some experience writing code that runs in kernel mode. The following OnLamp tutorial is intended for OpenBSD, but I think most of it applies to FreeBSD a

Re: How does not practice freebsd kernel programming?

2007-03-12 Thread Soeren Straarup
On Mon, Mar 12, 2007 at 09:36:43AM +0530, ajay gopalakrishnan wrote: > Hi, > > What is the best way to start practicing kernel programming on freebsd for > amateurs. I have found many sites about Linux kernel programming but none > for FReebsd kernel programming. > What a

How does not practice freebsd kernel programming?

2007-03-11 Thread ajay gopalakrishnan
Hi, What is the best way to start practicing kernel programming on freebsd for amateurs. I have found many sites about Linux kernel programming but none for FReebsd kernel programming. What are the usual steps followed while learning freebsd kernel programming? Thanks, Ajay

Re: How should i start working on kernel programming?

2007-03-05 Thread Peter Jeremy
On 2007-Mar-05 15:31:09 -0500, Dave Arsenault <[EMAIL PROTECTED]> wrote: >How would I go about debugging a LKM. I am currently working on a simple >kernel module that overwrites the open() syscall and sends the output >through a parsing routine. Have a read of /usr/src/tools/debugscripts/README I

Re: How should i start working on kernel programming?

2007-03-05 Thread Dave Arsenault
How would I go about debugging a LKM. I am currently working on a simple kernel module that overwrites the open() syscall and sends the output through a parsing routine. I've read many articles talking about using the (gdb) add-symbol-file lkm.ko and in fact that works but as far as I know I can

Re: How should i start working on kernel programming?

2007-03-03 Thread Peter Jeremy
On 2007-Mar-03 10:21:27 +0530, ajay gopalakrishnan <[EMAIL PROTECTED]> wrote: >I am new to FreeBSD and I would like to know how to start off with kernel >level programming. Apart from the links Sam gave you, I'd suggest you look at "The Design and Implementation of the FreeBSD Operating System" by

Re: How should i start working on kernel programming?

2007-03-03 Thread Sam Banks
inux > distros like Fedora, RHCE, debian but now i am faced with > doing some kernel level network programming on FreeBSD. > > I had googled for some kernel programming tutorials. But > mostly i could find only linux kernel programming guides. > I didnt proceed with them since i

How should i start working on kernel programming?

2007-03-02 Thread ajay gopalakrishnan
Hey all, I have done a bit of system level programming on linux distros like Fedora, RHCE, debian but now i am faced with doing some kernel level network programming on FreeBSD. I had googled for some kernel programming tutorials. But mostly i could find only linux kernel programming guides. I

Kernel programming

2006-01-14 Thread Pranav Sawargaonkar
Hi I have doubt about accessing vmspace structure using proc pointer. I have written code below in my module and try to find out data size of a program, but during make it is giving me errors.Please anyone tell me what is right way to code my function. Function I have written is- static int myfu

Re: kernel programming

2005-04-20 Thread Zera William Holladay
On Wed, 20 Apr 2005 [EMAIL PROTECTED] wrote: > yeah thanks for that, i figured the code was a good start. Now that I > know the docs i know where to go, cheers for that > > --neuro > > On Wed, 20 Apr 2005, Joseph Koshy wrote: > > >> where's a good place f

Re: kernel programming

2005-04-19 Thread neuro
yeah thanks for that, i figured the code was a good start. Now that I know the docs i know where to go, cheers for that --neuro On Wed, 20 Apr 2005, Joseph Koshy wrote: where's a good place for kernel programming documentation ? In no particular order: 1. The FreeBSD Developer's H

Re: kernel programming

2005-04-19 Thread Joseph Koshy
> where's a good place for kernel programming documentation ? In no particular order: 1. The FreeBSD Developer's Handbook. 2. The FreeBSD Architecture Handbook. 3. The book 'The Design and Implementation of the FreeBSD Operating System', by Kirk McKusick and George

kernel programming

2005-04-19 Thread neuro
where's a good place for kernel programming documentation ? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: kernel programming

2003-03-01 Thread Tuomas Makinen
On Sat, 2003-03-01 at 02:19, Jay Sern Liew wrote: > Greetings, > Just wanted to ask a qwik question. I'm keen on programming FreeBSD, from > simple tools, to kernel modules and the kernel itself. I don't find much > help/resource on this for FreeBSD in general, but tonnes for Linux. > My

kernel programming

2003-02-28 Thread Jay Sern Liew
Greetings, Just wanted to ask a qwik question. I'm keen on programming FreeBSD, from simple tools, to kernel modules and the kernel itself. I don't find much help/resource on this for FreeBSD in general, but tonnes for Linux. My question is, will I be wasting my time reading docs like tho

Re: more kernel programming style questions

2002-12-14 Thread Wes Peters
"M. Warner Losh" wrote: > > You are better off defining a series of macros that do proper > bus_space_readN/bus_space_writeN for each of the fields in the > register set. This will ensure that your driver works unaltered on > other architectures. > > Directly accessing memory mapped devices is a

Re: more kernel programming style questions

2002-12-13 Thread M. Warner Losh
You are better off defining a series of macros that do proper bus_space_readN/bus_space_writeN for each of the fields in the register set. This will ensure that your driver works unaltered on other architectures. Directly accessing memory mapped devices is a bad idea. While it works on i386, the

Re: more kernel programming style questions

2002-12-13 Thread Louis A. Mamakos
I'm not holding this up as the best example of style, but take a look at the Bt848 driver in /sys/pci for one approach. Some years ago I contributed some patches that got integrated that turned those offset references into a structure definition. The structure definition was done with some macr

more kernel programming style questions

2002-12-13 Thread Daniel Lang
Hi, now I've come across another style problem. The MOXA hardware of course maintains a structure for each channel. I have details about the size and offsets for each field, belonging to a channel. What would be the most sensible way, to access them? I can come up, with two possiblities: use

Kernel programming references

2002-08-03 Thread Alp ATICI
What references would you suggest for learning kernel programming and FreeBSD internals for someone who has quite good background in C programming and Operating System algorithms in general? I just bought: The Design and Implementation of the 4.4 BSD Operating System The Design of the Unix

Re: Some questions about kernel programming

2001-07-13 Thread Sergey Babkin
Alfred Perlstein wrote: > > * Greg Lehey <[EMAIL PROTECTED]> [010712 21:08] wrote: > > On Thursday, 12 July 2001 at 6:58:09 -0500, [EMAIL PROTECTED] wrote: > > > Dear Friends > > > > > > I have some questions about kernel programming: > >

Re: Some questions about kernel programming

2001-07-13 Thread Terry Lambert
Alfred Perlstein wrote: > > write() doesn't exist in the kernel. The simple answer is "you're > > going to have to read what the send() syscall does and emulate it". > > First, though, you need to answer the question "why do I want to do > > this in the kernel?" > > it actually exists, however t

Re: Some questions about kernel programming

2001-07-13 Thread Alfred Perlstein
* Eugene L. Vorokov <[EMAIL PROTECTED]> [010713 10:24] wrote: > > ch = fubyte(uaddr); > > And one more question, does this mean that I can't use things x = *uaddr > and *uaddr = x for userspace, but always have to use fubyte() and subyte () ? > If so, what is the reason it was done li

Re: Some questions about kernel programming

2001-07-13 Thread Alfred Perlstein
* Eugene L. Vorokov <[EMAIL PROTECTED]> [010713 10:16] wrote: > > /* > > * return number of characters in a userland address string > > * or -1 if an illegal access occurs. > > */ > Then I don't get it. Won't this piece of code cycle forever fetching > first byte of the string again and again

Re: Some questions about kernel programming

2001-07-13 Thread Drew Eckhardt
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] w rites: >> ch = fubyte(uaddr); > >And one more question, does this mean that I can't use things x = *uaddr >and *uaddr = x for userspace, but always have to use fubyte() and subyte () ? Right. >If so, what is the reason it was done

Re: Some questions about kernel programming

2001-07-13 Thread Eugene L. Vorokov
> ch = fubyte(uaddr); And one more question, does this mean that I can't use things x = *uaddr and *uaddr = x for userspace, but always have to use fubyte() and subyte () ? If so, what is the reason it was done like that ? Regards, Eugene To Unsubscribe: send mail to [EMAIL PROTE

Re: Some questions about kernel programming

2001-07-13 Thread Eugene L. Vorokov
> /* > * return number of characters in a userland address string > * or -1 if an illegal access occurs. > */ > int > user_strlen(uaddr) > char *uaddr; > { > int ret; > > ret = -1; > do { > ch = fubyte(uaddr); > ret++; > } while (ch !=

Re: Some questions about kernel programming

2001-07-13 Thread Brian Somers
> Have a look at the digi driver in -current where I did this. The > caveat is that the kernel code looks ugly. From the driver's ioctl > routine: > > case DIGIIO_IDENT: > return (copyout(sc->name, *(char **)data, > strlen(sc

Re: Some questions about kernel programming

2001-07-13 Thread Brian Somers
> > write() doesn't exist in the kernel. The simple answer is "you're > > going to have to read what the send() syscall does and emulate it". > > First, though, you need to answer the question "why do I want to do > > this in the kernel?" > > it actually exists, however the problem is that copyi

Re: Some questions about kernel programming

2001-07-12 Thread Alfred Perlstein
* Eugene L. Vorokov <[EMAIL PROTECTED]> [010713 01:33] wrote: > Forgot to Cc: here: > > > You can't call kernel strlen on a userland address, you must do > > something like this: > > How so ? It seems to work for me. For instance, I used userland > address space buffer to simulate __getcwd() sys

Re: Some questions about kernel programming

2001-07-12 Thread Eugene L. Vorokov
Forgot to Cc: here: > You can't call kernel strlen on a userland address, you must do > something like this: How so ? It seems to work for me. For instance, I used userland address space buffer to simulate __getcwd() syscall on the current process (I was hacking open() syscall and log full path

Re: Some questions about kernel programming

2001-07-12 Thread Alfred Perlstein
* Greg Lehey <[EMAIL PROTECTED]> [010712 21:08] wrote: > On Thursday, 12 July 2001 at 6:58:09 -0500, [EMAIL PROTECTED] wrote: > > Dear Friends > > > > I have some questions about kernel programming: > > You'd be better off sending mail like this to -hacke

Re: Some questions about kernel programming

2001-07-12 Thread Greg Lehey
On Thursday, 12 July 2001 at 6:58:09 -0500, [EMAIL PROTECTED] wrote: > Dear Friends > > I have some questions about kernel programming: You'd be better off sending mail like this to -hackers. I've followed up there. > 1. Why I can call some system calls functio

Re: Kernel programming (fwd)

2001-01-24 Thread AARON J MARKS
s B. <[EMAIL PROTECTED]>, [EMAIL PROTECTED], > [EMAIL PROTECTED] > Subject: Re: Kernel programming > > Thus spake Dag-Erling Smorgrav ([EMAIL PROTECTED]): > > > > There recently (last week or something) was a thread here or on > > > another mailinglist on h

Re: Kernel programming

2001-01-23 Thread Felix-Antoine Paradis
You can refer to the FreeBSD Handbook (www.freebsd.org/handbook) On Mon, 22 Jan 2001, Yonny Cardenas B. wrote: > Hello > > I am adding a set the new system calls to FreeBSD kernel, > but to compile and to test new source code within the kernel > is a little hard when there is some problem. > > I

Re: Kernel programming

2001-01-23 Thread Dag-Erling Smorgrav
Alexander Langer <[EMAIL PROTECTED]> writes: > Thus spake Dag-Erling Smorgrav ([EMAIL PROTECTED]): > > Alexander Langer <[EMAIL PROTECTED]> writes: > > > There recently (last week or something) was a thread here or on > > > another mailinglist on how to debug kernel moduls, which is a little > > >

Re: Kernel programming

2001-01-23 Thread Alexander Langer
Thus spake Dag-Erling Smorgrav ([EMAIL PROTECTED]): > > There recently (last week or something) was a thread here or on > > another mailinglist on how to debug kernel moduls, which is a little > > bit tricky. > It's also documented in the handbook. Well, actually debugging modules is a little bi

Re: Kernel programming

2001-01-23 Thread Dag-Erling Smorgrav
[EMAIL PROTECTED] (Alexander Langer) writes: > There recently (last week or something) was a thread here or on > another mailinglist on how to debug kernel moduls, which is a little > bit tricky. It's also documented in the handbook. DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscri

Re: Kernel programming

2001-01-23 Thread Alexander Langer
Thus spake Yonny Cardenas B. ([EMAIL PROTECTED]): > Is there anybody knows some reference (URL), tools or some help > to programming and debugging in the kernel FreeBSD? Try http://www.freebsd.org/tutorials/ Andrew W. Reiter has written a nice kernel mod tutorial. There recently (last week or

Re: Kernel programming

2001-01-22 Thread Tim McMillen
Are you looking for something more than: http://www.freebsd.org/handbook/kerneldebug.html I don't know if there is any. There are a fair amount of undocumented system calls in the FreeBSD kernel as I understand it. Chapter 22 of the handbook may be helpful too. There may also be some

Kernel programming

2001-01-22 Thread Yonny Cardenas B.
Hello I am adding a set the new system calls to FreeBSD kernel, but to compile and to test new source code within the kernel is a little hard when there is some problem. Is there anybody knows some reference (URL), tools or some help to programming and debugging in the kernel FreeBSD? That