Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 2002 12:00:47 -0500
From:      "Ugen Antsilevitch" <ugen@undp.org>
To:        questions@freebsd.org
Subject:   Kernel module and syscall locking.
Message-ID:  <897afe89645d.89645d897afe@undp.org>

next in thread | raw e-mail | index | archive | help
I am getting a little rusty on my syscall skills. So here is the 
situation:

- I have a kernel module that loads and initializes a function pointer
  or two. Once initialized, these function pointers will be used in
  a system call (such as execve for instance) to do some evil magic.

- With ipfw as an example locking for the initialization is easy - 
  splnet, that shuts down network processing for as long as init runs.

- Now with a system call here is what i am wondering:
   1) Do i have to lock at all? Can a user initiate a system call
      while something else happens in kernel? (That is - can the context 
      get switched to a user and then another kernel?)
   2) If i do have to lock is it by means of splsomething? I think
      these are pretty much interrupt levels, so for user calls that
      won't do any good?
   3) 4.2 (and 4.X in general) are still single "thread" kernels,
      right? what about 5.0 ? (that may be an ignorance question but
      i can't download the source tree now, with the modem connection
      being the only one available).

Thanx!
--Ugen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?897afe89645d.89645d897afe>