> 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
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
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
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
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
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
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
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
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
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
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
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
> 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
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]"
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
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
"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
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
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
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
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
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:
> >
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
* 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
* 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
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
> 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
> /*
> * 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 !=
> 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
> > 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
* 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
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
* 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
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
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
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
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
> > >
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
[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
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
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
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
42 matches
Mail list logo